protected HttpResponse CreateHttpResponse(HttpStatusCode statusCode, string location)
{
var encoding = Encoding.UTF8;
var response = new HttpResponse
{
StatusCode = statusCode,
ContentEncoding = "UTF8",
ContentLength = 0,
RawBytes = encoding.GetBytes(""),
ContentType = "application/json",
};
if (location != null)
{
response.Headers.Add(new HttpHeader
{
Name = "Location",
Value = location
});
}
return response;
}