blob: 157b43af7557f789c83a35a579c222c4d2491665 [file] [log] [blame]
kkhorimoto555f7402015-05-26 20:28:211// Copyright 2015 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_
6#define IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_
7
kkhorimoto555f7402015-05-26 20:28:218#include "net/http/http_response_headers.h"
9
10@class NSHTTPURLResponse;
11
12namespace net {
13
14// Placeholder status description since the actual text from the headers is not
15// available.
John Z Wu14af80f2019-06-14 17:25:5716extern const char kDummyHttpStatusDescription[];
kkhorimoto555f7402015-05-26 20:28:2117
18// Constructs a net::HttpResponseHeaders from |response|.
19// Note: The HTTP version and the status code description are not accessible
20// from NSHTTPURLResponse, so HTTP/1.0 and kDummyHttpStatusDescription will
21// be used in the status line instead.
22scoped_refptr<HttpResponseHeaders> CreateHeadersFromNSHTTPURLResponse(
23 NSHTTPURLResponse* response);
24
25} // namespace net
26
27#endif // IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_