message GetResourceRequest {
// A unique request id.
string requestId = 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-25 (世界標準時間)。"],[[["`google.api.HttpBody` is used to represent arbitrary HTTP request or response bodies, especially for non-JSON formats like raw binary or HTML."],["It can be used in both streaming and non-streaming API methods, and as a top-level request field to access raw HTTP body along with URL or template parameters."],["`google.api.HttpBody` has three fields: `contentType` for specifying the content type, `data` for the raw body content (base64-encoded), and `extensions` for application-specific metadata."],["Using this type only affects how request and response bodies are handled; other API features remain unchanged."]]],["The `HttpBody` message represents raw HTTP payloads, useful for non-JSON formats like binary or HTML. It can be used in both streaming and non-streaming API requests and responses, even as a top-level request field, and all other features remain unchanged. It contains `contentType` (Content-Type header), `data` (raw body as base64-encoded string), and optional `extensions` (application-specific metadata). The message type also allows streaming rpcs, and the JSON representation is also defined.\n"]]