Class: 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.
Implements
Constructors
constructor
• new Http(properties?
): Http
Constructs a new Http.
Parameters
Name | Type | Description |
---|---|---|
properties? | IHttp | Properties to set |
Returns
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.
Implementation of
IHttp.fullyDecodeReservedExpansion
rules
• rules: IHttpRule
[]
A list of HTTP configuration rules that apply to individual API methods.
NOTE: All service configuration rules follow "last one wins" order.
Implementation of
Methods
toJSON
▸ toJSON(): Object
Converts this Http to JSON.
Returns
Object
JSON object
create
▸ create(properties?
): Http
Creates a new Http instance using the specified properties.
Parameters
Name | Type | Description |
---|---|---|
properties? | IHttp | Properties to set |
Returns
Http instance
decode
▸ decode(reader
, length?
): Http
Decodes a Http message from the specified reader or buffer.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
Http
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader
): Http
Decodes a Http message from the specified reader or buffer, length delimited.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
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
Name | Type | Description |
---|---|---|
message | IHttp | Http message or plain object to encode |
writer? | Writer | Writer 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
Name | Type | Description |
---|---|---|
message | IHttp | Http message or plain object to encode |
writer? | Writer | Writer 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
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
Http
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for Http
Parameters
Name | Type | Description |
---|---|---|
typeUrlPrefix? | string | your custom typeUrlPrefix(default "type.googleapis.com") |
Returns
string
The default type url
toObject
▸ toObject(message
, options?
): Object
Creates a plain object from a Http message. Also converts values to other types if specified.
Parameters
Name | Type | Description |
---|---|---|
message | Http | Http |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object