Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
httpbody.proto81 linesDownload Raw Back to api
1// Copyright 2026 Google LLC2//3// Licensed under the Apache License, Version 2.0 (the "License");4// you may not use this file except in compliance with the License.5// You may obtain a copy of the License at6//7//     http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// distributed under the License is distributed on an "AS IS" BASIS,11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12// See the License for the specific language governing permissions and13// limitations under the License.14 15syntax = "proto3";16 17package google.api;18 19import "google/protobuf/any.proto";20 21option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody";22option java_multiple_files = true;23option java_outer_classname = "HttpBodyProto";24option java_package = "com.google.api";25option objc_class_prefix = "GAPI";26 27// Message that represents an arbitrary HTTP body. It should only be used for28// payload formats that can't be represented as JSON, such as raw binary or29// an HTML page.30//31//32// This message can be used both in streaming and non-streaming API methods in33// the request as well as the response.34//35// It can be used as a top-level request field, which is convenient if one36// wants to extract parameters from either the URL or HTTP template into the37// request fields and also want access to the raw HTTP body.38//39// Example:40//41//     message GetResourceRequest {42//       // A unique request id.43//       string request_id = 1;44//45//       // The raw HTTP body is bound to this field.46//       google.api.HttpBody http_body = 2;47//48//     }49//50//     service ResourceService {51//       rpc GetResource(GetResourceRequest)52//         returns (google.api.HttpBody);53//       rpc UpdateResource(google.api.HttpBody)54//         returns (google.protobuf.Empty);55//56//     }57//58// Example with streaming methods:59//60//     service CaldavService {61//       rpc GetCalendar(stream google.api.HttpBody)62//         returns (stream google.api.HttpBody);63//       rpc UpdateCalendar(stream google.api.HttpBody)64//         returns (stream google.api.HttpBody);65//66//     }67//68// Use of this type only changes how the request and response bodies are69// handled, all other features will continue to work unchanged.70message HttpBody {71  // The HTTP Content-Type header value specifying the content type of the body.72  string content_type = 1;73 74  // The HTTP request/response body as raw binary.75  bytes data = 2;76 77  // Application specific response metadata. Must be set in the first response78  // for streaming APIs.79  repeated google.protobuf.Any extensions = 3;80}81 
codekingpro/portable-devtools · Team Ai