All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.projects.queries.ProjectGet Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.projects.queries;

import io.sphere.sdk.client.HttpRequestIntent;
import io.sphere.sdk.client.SphereRequest;
import io.sphere.sdk.client.SphereRequestBase;
import io.sphere.sdk.http.HttpResponse;
import io.sphere.sdk.projects.Project;
import io.sphere.sdk.json.SphereJsonUtils;

import static io.sphere.sdk.http.HttpMethod.GET;

public class ProjectGet extends SphereRequestBase implements SphereRequest {
    private ProjectGet() {
    }

    @Override
    public Project deserialize(final HttpResponse httpResponse) {
        return SphereJsonUtils.readObject(httpResponse.getResponseBody(), Project.typeReference());
    }

    @Override
    public HttpRequestIntent httpRequestIntent() {
        return HttpRequestIntent.of(GET, "");
    }

    public static SphereRequest of() {
        return new ProjectGet();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy