コード例 #1
0
        public Response(IDictionary <string, string> headers)
        {
            Ensure.ArgumentNotNull(headers, nameof(headers));

            Headers = new ReadOnlyDictionary <string, string>(headers);
            ApiInfo = ApiInfoParser.ParseResponseHeaders(headers);
        }
コード例 #2
0
        public Response(HttpStatusCode statusCode, object body, IDictionary <string, string> headers, string contentType)
        {
            Ensure.ArgumentNotNull(headers, nameof(headers));

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