Index: mojo/services/network/public/interfaces/url_loader.mojom |
diff --git a/mojo/services/network/public/interfaces/url_loader.mojom b/mojo/services/network/public/interfaces/url_loader.mojom |
deleted file mode 100644 |
index f7e12c849b9dae14dedd93edd9eb9f621ec806f8..0000000000000000000000000000000000000000 |
--- a/mojo/services/network/public/interfaces/url_loader.mojom |
+++ /dev/null |
@@ -1,112 +0,0 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-module mojo; |
- |
-import "network/public/interfaces/http_message.mojom"; |
-import "network/public/interfaces/network_error.mojom"; |
- |
-struct URLRequest { |
- // The URL to load. |
- string url; |
- |
- // The HTTP method if applicable. |
- string method = "GET"; |
- |
- // Additional HTTP request headers. |
- array<HttpHeader>? headers; |
- |
- // The payload for the request body, represented as a concatenation of data |
- // streams. For HTTP requests, the method must be set to "POST" or "PUT". |
- array<handle<data_pipe_consumer>>? body; |
- |
- // The buffer size of the data pipe returned in URLResponse's |body| member. |
- // A value of 0 indicates that the default buffer size should be used. This |
- // value is just a suggestion. The URLLoader may choose to ignore this value. |
- uint32 response_body_buffer_size = 0; |
- |
- // If set to true, then redirects will be automatically followed. Otherwise, |
- // when a redirect is encounterd, FollowRedirect must be called to proceed. |
- bool auto_follow_redirects = false; |
- |
- // If set to true, then the HTTP request will bypass the local cache and will |
- // have a 'Cache-Control: nocache' header added in that causes any proxy |
- // servers to also not satisfy the request from their cache. This has the |
- // effect of forcing a full end-to-end fetch. |
- bool bypass_cache = false; |
- |
- // The time when this request originated. 0 indicates that it is not recorded. |
- int64 originating_time_ticks = 0; |
-}; |
- |
-struct URLResponse { |
- // If the response resulted in a network level error, this field will be set. |
- NetworkError? error; |
- |
- // The response body stream. Read from this data pipe to receive the bytes of |
- // response body. |
- handle<data_pipe_consumer>? body; |
- |
- // The final URL of the response, after redirects have been followed. |
- string? url; |
- |
- // The site of the URL. |
- string? site; |
- |
- // The HTTP status code. 0 if not applicable. |
- uint32 status_code; |
- |
- // The HTTP status line. |
- string? status_line; |
- |
- // The HTTP response headers. |
- array<HttpHeader>? headers; |
- |
- // The MIME type of the response body. |
- string? mime_type; |
- |
- // The character set of the response body. |
- string? charset; |
- |
- // These fields are set to non-NULL if this response corresponds to a |
- // redirect. Call the |FollowRedirect| method on the URLLoader instance to |
- // follow this redirect. |
- string? redirect_method; |
- string? redirect_url; |
- string? redirect_referrer; |
-}; |
- |
-struct URLLoaderStatus { |
- // If the loader has failed due to a network level error, this field will be |
- // set. |
- NetworkError? error; |
- |
- // Set to true if the URLLoader is still working. Set to false once an error |
- // is encountered or the response body is completely copied to the response |
- // body stream. |
- bool is_loading; |
- |
- // The length in bytes of the content as reported by the HTTP response header, |
- // and the number of bytes read by the URLLoader thus far. |
- int64 content_length; |
- int64 bytes_read; |
- |
- // TODO(darin): Add further details about the stages of loading (e.g., |
- // "resolving host") that happen prior to receiving bytes. |
-}; |
- |
-interface URLLoader { |
- // Loads the given |request|, asynchronously producing |response|. Consult |
- // |response| to determine if the request resulted in an error, was |
- // redirected, or has a response body to be consumed. |
- Start(URLRequest request) => (URLResponse response); |
- |
- // If the request passed to |Start| had |auto_follow_redirects| set to false, |
- // then upon receiving an URLResponse with a non-NULL |redirect_url| field, |
- // |FollowRedirect| may be called to load the URL indicated by the redirect. |
- FollowRedirect() => (URLResponse response); |
- |
- // Query status about the URLLoader. |
- QueryStatus() => (URLLoaderStatus status); |
-}; |