Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(proto): redefine HTTP headers structure #4

Merged
merged 3 commits into from
Nov 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions sdk/http.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ message HTTPClient {
string method = 1;

// Headers are the HTTP headers to include in the HTTP request.
map<string, string> headers = 2;
map<string, Header> headers = 2;

// URL is the HTTP URL to call.
string url = 3;
Expand All @@ -37,10 +37,19 @@ message HTTPClientResponse {
int32 code = 2;

// Headers are the HTTP headers returned from the HTTP request.
map<string, string> headers = 3;
map<string, Header> headers = 3;

// Body is the server-supplied HTTP payload data. The server-supplied payload
// will be a byte slice.
bytes body = 4;
}

// Header is a structure used to define HTTP headers for HTTP requests.
// As HTTP headers can have multiple values, this structure is used to define
// the header values.
message Header {
// Value is the HTTP header value to include in requests and responses.
// This field is a repeated field to allow for multiple values
// which is allowed in HTTP headers.
repeated string value = 2;
madflojo marked this conversation as resolved.
Show resolved Hide resolved
}
Loading