本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.4KB

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