xunjieli | 11834f0 | 2015-12-22 04:27:08 | [diff] [blame] | 1 | // 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 NET_HTTP_BIDIRECTIONAL_STREAM_REQUEST_INFO_H_ |
| 6 | #define NET_HTTP_BIDIRECTIONAL_STREAM_REQUEST_INFO_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include "net/base/net_export.h" |
| 11 | #include "net/base/request_priority.h" |
| 12 | #include "net/http/http_request_headers.h" |
Paul Jensen | 76bfe08 | 2018-02-23 03:36:05 | [diff] [blame] | 13 | #include "net/socket/socket_tag.h" |
xunjieli | 11834f0 | 2015-12-22 04:27:08 | [diff] [blame] | 14 | #include "url/gurl.h" |
| 15 | |
| 16 | namespace net { |
| 17 | |
| 18 | // Struct containing information needed to request a BidirectionalStream. |
| 19 | struct NET_EXPORT BidirectionalStreamRequestInfo { |
| 20 | BidirectionalStreamRequestInfo(); |
| 21 | ~BidirectionalStreamRequestInfo(); |
| 22 | |
| 23 | // The requested URL. |
| 24 | GURL url; |
| 25 | |
| 26 | // The method to use (GET, POST, etc.). |
| 27 | std::string method; |
| 28 | |
Steven Valdez | 80672a4 | 2018-04-24 21:52:30 | [diff] [blame] | 29 | // Whether to allow early data to be used with this request, overriding the |
| 30 | // early data based on the |method| semantics. |
| 31 | bool allow_early_data_override; |
| 32 | |
xunjieli | 11834f0 | 2015-12-22 04:27:08 | [diff] [blame] | 33 | // Request priority. |
| 34 | RequestPriority priority; |
| 35 | |
Paul Jensen | 76bfe08 | 2018-02-23 03:36:05 | [diff] [blame] | 36 | // Socket tag to apply to sockets used to process this request. |
| 37 | SocketTag socket_tag; |
| 38 | |
xunjieli | 11834f0 | 2015-12-22 04:27:08 | [diff] [blame] | 39 | // Any extra request headers (including User-Agent). |
| 40 | HttpRequestHeaders extra_headers; |
| 41 | |
| 42 | // Whether END_STREAM should be set on the request HEADER frame. |
| 43 | bool end_stream_on_headers; |
| 44 | }; |
| 45 | |
| 46 | } // namespace net |
| 47 | |
| 48 | #endif // NET_HTTP_BIDIRECTIONAL_STREAM_REQUEST_INFO_H_ |