Exemplo n.º 1
0
        public Response(IDictionary <string, string> headers)
        {
            Ensure.ArgumentIsNotNull(headers, "headers");

            Headers = new ReadOnlyDictionary <string, string>(headers);
            ApiInfo = ApiInfoParser.ParseResponseHeaders(headers);
        }
Exemplo n.º 2
0
        public Response(HttpStatusCode statusCode, object body, IDictionary <string, string> headers, string contentType)
        {
            Ensure.ArgumentIsNotNull(headers, "headers");

            StatusCode  = statusCode;
            Body        = body;
            Headers     = new ReadOnlyDictionary <string, string>(headers);
            ApiInfo     = ApiInfoParser.ParseResponseHeaders(headers);
            ContentType = contentType;
        }