Class RestGrpcAdapter (4.4.0)

public sealed class RestGrpcAdapter : GrpcAdapter

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

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
Type Description
RestGrpcAdapter

Methods

ConvertHttpStatusCode(int)

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
Name Description
httpStatusCode int

The HTTP status code to convert

Returns
Type Description
StatusCode

The converted gRPC status code.