با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
منبع: HttpBody
پیامی که یک بدنه HTTP دلخواه را نشان میدهد. فقط باید برای قالبهای باری استفاده شود که نمیتوانند بهعنوان JSON نشان داده شوند، مانند باینری خام یا صفحه HTML.
این پیام را می توان هم در روش های پخش جریانی و هم در روش های غیر استریم API در درخواست و همچنین پاسخ استفاده کرد.
می توان از آن به عنوان یک فیلد درخواست سطح بالا استفاده کرد، که اگر بخواهید پارامترهایی را از URL یا الگوی HTTP در فیلدهای درخواست استخراج کنید و همچنین بخواهید به بدنه HTTP خام دسترسی داشته باشید، راحت است.
مثال:
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);
}
فراداده پاسخ خاص برنامه باید در اولین پاسخ برای APIهای جریانی تنظیم شود.
یک شی حاوی فیلدهایی از نوع دلخواه. یک فیلد اضافی "@type" حاوی یک URI است که نوع را مشخص می کند. مثال: { "id": 1234, "@type": "types.example.com/standard/id" } .
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-24 بهوقت ساعت هماهنگ جهانی."],[[["`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"]]