This repository has been archived on 2019-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
Typertext/lib/Typertext/Json/JsonResponse.ts
2014-02-26 13:12:37 -06:00

14 lines
675 B
TypeScript

/**
* Created by kegan on 2/26/14.
*/
module Typertext.Json {
export class JsonResponse extends Typertext.GenericResponse<JsonObject> {
public static fromHttpResponse(httpResponse:Typertext.Http.HttpResponse):JsonResponse {
return new JsonResponse(httpResponse.GetStatus(), httpResponse.GetHeaders(), httpResponse.GetHttpStatus(), window["JSON"].parse(httpResponse.GetContent()));
}
constructor(status:Typertext.Http.HttpResponseStatus, responseHeaders?:Typertext.Http.HttpHeaderData, httpResponseCode?:number, responseBody?:JsonObject) {
super(status, responseHeaders, httpResponseCode, responseBody);
}
}
}