Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
CreateResponse
public class CreateResponse : HttpResponseMessage
{
public CreateResponse()
{
StatusCode = HttpStatusCode.Created;
}
public CreateResponse(IApiResource resource) :this()
{
var location = new ResourceLocation();
resource.SetLocation(location);
Headers.Location = location.Location;
}
}
public class CreateResponse<T> : HttpResponseMessage<T> where T : IApiResponse
{
public CreateResponse() : base(HttpStatusCode.Created)
{
}
public CreateResponse(T resource) : base(resource, HttpStatusCode.Created)
{
var apiResource = resource as IApiResource;
var resourceLocation = new ResourceLocation();
apiResource.SetLocation(resourceLocation);
Headers.Location = resourceLocation.Location;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.