-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhttp.proto
40 lines (30 loc) · 938 Bytes
/
http.proto
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
syntax = "proto3";
import "google/protobuf/descriptor.proto";
package pandit.format;
message HTTP {
// map<string, string> headers = 50000;
oneof pattern {
// Maps to HTTP GET. Used for listing and getting information about
// resources.
string get = 50001;
// Maps to HTTP PUT. Used for replacing a resource.
string put = 50002;
// Maps to HTTP POST. Used for creating a resource or performing an action.
string post = 50003;
// Maps to HTTP DELETE. Used for deleting a resource.
string delete = 50004;
// Maps to HTTP PATCH. Used for updating a resource.
string patch = 50005;
}
}
enum HTTPVersion {
VERSION_1_0 = 0;
VERSION_1_1 = 1;
VERSION_2_0 = 2;
}
message HTTPService {
string hostname = 50006;
HTTPVersion version = 50007;
}
extend google.protobuf.MethodOptions { HTTP http = 50011; }
extend google.protobuf.ServiceOptions { HTTPService http_service = 50012; }