Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // HeaderAccept 是接受标标识. HeaderAccept = http.CanonicalHeaderKey("Accept") // HeaderContentType 是内容类型标识. HeaderContentType = http.CanonicalHeaderKey("Content-Type") // HeaderAcceptLanguage 是接受语言标识. HeaderAcceptLanguage = http.CanonicalHeaderKey("Accept-Language") )
Functions ¶
func ContentSubtype ¶
ContentSubtype 返回给定内容类型的content-subtype. 给定的content-type必须是以开头的有效content-type,但不会返回content-subtype.
根据RFC7231. contentType的变量名假定都是小写字母.
func GRPCCodeFromStatus ¶
GRPCCodeFromStatus 将HTTP错误代码转换为相应的gRPC响应状态. See: https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
func StatusFromGRPCCode ¶
StatusFromGRPCCode 将gRPC错误代码转换为相应的HTTP响应状态. See: https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.