Documentation
¶
Index ¶
Constants ¶
View Source
const ( ContentEncodingHeader = "Content-Encoding" AcceptEncodingHeader = "Accept-Encoding" )
View Source
const ( URL = "url" METHOD = "method" BODY = "body" HEADER = "header" QUERYPARAMS = "query_params" URLENCODEBODY = "url_encode_body" )
Variables ¶
This section is empty.
Functions ¶
func DoWithStatus ¶
func SetTag ¶ added in v0.138.0
func SetTag(r *http.Request, tag RequestTag)
SetTag tags an outgoing request with the given tag
Types ¶
type RequestTag ¶ added in v0.138.0
type RequestTag string
RequestTag is used to tag requests we trigger from WunderGraph and avoid circular dependencies
const ( // RequestTagUserInfo indicates the request is fetching // the userInfo endpoint for token based authentication RequestTagUserInfo RequestTag = "userInfo" // RequestTagNone indicates the request had no valid tag RequestTagNone RequestTag = "" )
func Tag ¶ added in v0.138.0
func Tag(r *http.Request) RequestTag
Tag retrieves the tag for an incoming request. If the header missing or present but with an unknown value, it returns RequestTagNone.
Click to show internal directories.
Click to hide internal directories.