urlfetch_service.proto

 1syntax = "proto2";
 2option go_package = "urlfetch";
 3
 4package appengine;
 5
 6message URLFetchServiceError {
 7  enum ErrorCode {
 8    OK = 0;
 9    INVALID_URL = 1;
10    FETCH_ERROR = 2;
11    UNSPECIFIED_ERROR = 3;
12    RESPONSE_TOO_LARGE = 4;
13    DEADLINE_EXCEEDED = 5;
14    SSL_CERTIFICATE_ERROR = 6;
15    DNS_ERROR = 7;
16    CLOSED = 8;
17    INTERNAL_TRANSIENT_ERROR = 9;
18    TOO_MANY_REDIRECTS = 10;
19    MALFORMED_REPLY = 11;
20    CONNECTION_ERROR = 12;
21  }
22}
23
24message URLFetchRequest {
25  enum RequestMethod {
26    GET = 1;
27    POST = 2;
28    HEAD = 3;
29    PUT = 4;
30    DELETE = 5;
31    PATCH = 6;
32  }
33  required RequestMethod Method = 1;
34  required string Url = 2;
35  repeated group Header = 3 {
36    required string Key = 4;
37    required string Value = 5;
38  }
39  optional bytes Payload = 6 [ctype=CORD];
40
41  optional bool FollowRedirects = 7 [default=true];
42
43  optional double Deadline = 8;
44
45  optional bool MustValidateServerCertificate = 9 [default=true];
46}
47
48message URLFetchResponse {
49  optional bytes Content = 1;
50  required int32 StatusCode = 2;
51  repeated group Header = 3 {
52    required string Key = 4;
53    required string Value = 5;
54  }
55  optional bool ContentWasTruncated = 6 [default=false];
56  optional int64 ExternalBytesSent = 7;
57  optional int64 ExternalBytesReceived = 8;
58
59  optional string FinalUrl = 9;
60
61  optional int64 ApiCpuMilliseconds = 10 [default=0];
62  optional int64 ApiBytesSent = 11 [default=0];
63  optional int64 ApiBytesReceived = 12 [default=0];
64}