message GetResourceRequest {
// A unique request id.
string request_id = 1;
// The raw HTTP body is bound to this field.
google.api.HttpBody http_body = 2;
}
service ResourceService {
rpc GetResource(GetResourceRequest)
returns (google.api.HttpBody);
rpc UpdateResource(google.api.HttpBody)
returns (google.protobuf.Empty);
}
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[[["`HttpBody` is a message type used to represent arbitrary HTTP request or response bodies, especially for non-JSON formats like raw binary or HTML."],["It can be used with both streaming and non-streaming API methods, enabling flexibility in data transmission."],["`HttpBody` allows developers to access raw HTTP data while still using structured fields for other request parameters."],["It includes fields for specifying the content type (`content_type`), raw data (`data`), and any application-specific metadata (`extensions`)."]]],["The `HttpBody` message represents arbitrary HTTP bodies, useful for non-JSON formats like raw binary or HTML. It's applicable in both streaming and non-streaming API methods for requests and responses. It can serve as a top-level request field, allowing parameter extraction from URLs or HTTP templates alongside access to the raw body. Key components are: `content_type` (specifying the body's type), `data` (raw binary content), and `extensions` (metadata). Its usage alters request/response body handling while preserving other functionalities.\n"]]