Class RestGrpcAdapter (4.0.0)

public sealed class RestGrpcAdapter : GrpcAdapter

Implementation of GrpcAdapter that uses HTTP/1.1 and JSON, but via a gRPC .

Inheritance

Object > GrpcAdapter > RestGrpcAdapter

Namespace

Google.Api.Gax.Grpc.Rest

Assembly

Google.Api.Gax.Grpc.dll

Properties

Default

public static RestGrpcAdapter Default { get; }

Returns the default gRPC adapter for the REST transport.

Property Value
TypeDescription
RestGrpcAdapter

Methods

ConvertHttpStatusCode(Int32)

public static StatusCode ConvertHttpStatusCode(int httpStatusCode)

Converts an HTTP status code into the corresponding gRPC status code. Note that there is not a 1:1 correspondence between status code; multiple HTTP status codes can map to the same gRPC status code.

Parameter
NameDescription
httpStatusCodeInt32

The HTTP status code to convert

Returns
TypeDescription
StatusCode

The converted gRPC status code.