diff options
Diffstat (limited to 'toolkit/components/viaduct/fetch_msg_types.proto')
-rw-r--r-- | toolkit/components/viaduct/fetch_msg_types.proto | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/toolkit/components/viaduct/fetch_msg_types.proto b/toolkit/components/viaduct/fetch_msg_types.proto new file mode 100644 index 0000000000..96963cef42 --- /dev/null +++ b/toolkit/components/viaduct/fetch_msg_types.proto @@ -0,0 +1,42 @@ +syntax = "proto2"; + +// Note: this file name must be unique due to how the iOS megazord works :( + +package mozilla.appservices.httpconfig.protobuf; + +option java_package = "mozilla.appservices.httpconfig"; +option java_outer_classname = "MsgTypes"; +option swift_prefix = "MsgTypes_"; +option optimize_for = LITE_RUNTIME; + +message Request { + enum Method { + GET = 0; + HEAD = 1; + POST = 2; + PUT = 3; + DELETE = 4; + CONNECT = 5; + OPTIONS = 6; + TRACE = 7; + PATCH = 8; + } + required Method method = 1; + required string url = 2; + optional bytes body = 3; + map<string, string> headers = 4; + required bool follow_redirects = 5; + required bool use_caches = 6; + required int32 connect_timeout_secs = 7; + required int32 read_timeout_secs = 8; +} + +message Response { + // If this is present, nothing else is. + optional string exception_message = 1; + optional string url = 2; + optional int32 status = 3; + optional bytes body = 4; + map<string, string> headers = 5; +} + |