forked from cloudflare/privacy-gateway-server-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproto_http.proto
52 lines (48 loc) · 1.27 KB
/
proto_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
41
42
43
44
45
46
47
48
49
50
51
52
syntax = "proto3";
option go_package = ".;main";
message HeaderNameValue {
string name = 1;
string value = 2;
}
// A simplified Known Length Request, inspired by Binary HTTP:
// https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-binary-message#section-3.1
message Request {
// Control data
enum Method {
GET = 0;
HEAD = 1;
POST = 2;
PUT = 3;
DELETE = 4;
PATCH = 5;
OPTIONS = 6;
TRACE = 7;
// Note: CONNECT is not supported
}
enum Scheme {
HTTP = 0;
HTTPS = 1;
}
Method method = 1;
Scheme scheme = 2;
string authority = 3;
string path = 4;
// Header fields. Can be same header name but multiple values like for cookies.
repeated HeaderNameValue headers = 5;
// Content
bytes body = 6;
// Padding
bytes padding = 7;
}
// A simplified Known Length Response, inspired by Binary HTTP:
// https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-binary-message#section-3.1
message Response {
// Control data
int32 statusCode = 1;
// Header fields. Can be same header name but multiple values like for cookies.
repeated HeaderNameValue headers = 2;
// Content
bytes body = 3;
// Padding
bytes padding = 4;
}