summaryrefslogtreecommitdiffstats
path: root/toolkit/components/viaduct/fetch_msg_types.proto
blob: 96963cef42ada79a6aeb3499f96e4e325b488669 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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;
}