Skip to main content

Class: Http

google.api.Http

Defines the HTTP configuration for an API service. It contains a list of [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method to one or more HTTP REST API methods.

Properties

fullyDecodeReservedExpansion

fullyDecodeReservedExpansion: boolean

When set to true, URL path parameters will be fully URI-decoded except in cases of single segment matches in reserved expansion, where "%2F" will be left encoded.

The default behavior is to not decode RFC 6570 reserved characters in multi segment matches.


rules

rules: $Properties[]

A list of HTTP configuration rules that apply to individual API methods.

NOTE: All service configuration rules follow "last one wins" order.

Methods

toJSON

toJSON(): Object

Converts this Http to JSON.

Returns

Object

JSON object


create

create(properties?): Http & $Shape

Creates a new Http instance using the specified properties.

Parameters

NameTypeDescription
properties?$ShapeProperties to set

Returns

Http & $Shape

Http instance

create(properties?): Http

Parameters

NameType
properties?$Properties

Returns

Http


decode

decode(reader, length?): Http & $Shape

Decodes a Http message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

Http & $Shape

Http

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): Http & $Shape

Decodes a Http message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

Http & $Shape

Http

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified Http message. Does not implicitly google.api.Http.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesHttp message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified Http message, length delimited. Does not implicitly google.api.Http.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesHttp message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): Http

Creates a Http message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

Http

Http


toObject

toObject(message, options?): Object

Creates a plain object from a Http message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageHttpHttp
options?IConversionOptionsConversion options

Returns

Object

Plain object