Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Code ¶
func Code(code ...http.StatusCode) http.Arrow
Code is a mandatory statement to match expected HTTP Status Code against received one. The execution fails with StatusCode error if service responds with other value then specified one.
func Recv ¶
Recv applies auto decoders for response and returns either binary or native Go data structure. The Content-Type header give a hint to decoder. Supply the pointer to data target data structure.
func ServedForm ¶
ServedForm is a syntax sugar of Header("Content-Type", "application/x-www-form-urlencoded")
func ServedJSON ¶
ServedJSON is a syntax sugar of Header("Content-Type").Is("application/json")
Types ¶
type THeader ¶
type THeader struct {
// contains filtered or unexported fields
}
THeader is tagged string, represents HTTP Header
func Header ¶
Header matches presence of header in the response or match its entire content. The execution fails with BadMatchHead if the matched value do not meet expectations.