public final class HttpUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HttpUtil.Http2Error
All error codes identified by the HTTP/2 spec.
|
Modifier and Type | Field and Description |
---|---|
static Metadata.Key<String> |
CONTENT_TYPE
The Content-Type header name.
|
static String |
CONTENT_TYPE_GRPC
Content-Type used for GRPC-over-HTTP/2.
|
static String |
HTTP_METHOD
The HTTP method used for GRPC requests.
|
static Metadata.Key<String> |
TE
The TE header name.
|
static String |
TE_TRAILERS
The TE (transport encoding) header for requests over HTTP/2.
|
Modifier and Type | Method and Description |
---|---|
static Status |
httpStatusToGrpcStatus(int httpStatusCode)
Maps HTTP error response status codes to transport codes.
|
public static final Metadata.Key<String> CONTENT_TYPE
public static final String CONTENT_TYPE_GRPC
public static final String HTTP_METHOD
public static final Metadata.Key<String> TE
public static final String TE_TRAILERS
public static Status httpStatusToGrpcStatus(int httpStatusCode)