Documentation ¶
Index ¶
- func AcceptForm() http.Arrow
- func AcceptJSON() http.Arrow
- func ContentForm() http.Arrow
- func ContentJSON() http.Arrow
- func DELETE(uri string, args ...interface{}) http.Arrow
- func GET(uri string, args ...interface{}) http.Arrow
- func KeepAlive() http.Arrow
- func POST(uri string, args ...interface{}) http.Arrow
- func PUT(uri string, args ...interface{}) http.Arrow
- func Params(query interface{}) http.Arrow
- func Send(data interface{}) http.Arrow
- func URL(method, uri string, args ...interface{}) http.Arrow
- type THeader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptForm ¶
AcceptForm is syntax sugar of Header("Accept").Is("application/x-www-form-urlencoded")
func AcceptJSON ¶
AcceptJSON is syntax sugar of Header("Accept").Is("application/json")
func ContentForm ¶
ContentForm is syntax sugar of Header("Content-Type").Is("application/x-www-form-urlencoded")
func ContentJSON ¶
ContentJSON is syntax sugar of Header("Content-Type").Is("application/json")
func Params ¶
Params appends query params to request URL. The arrow takes a struct and converts it to map[string]string. The function fails if input is not convertable to map of strings (e.g. nested struct).
Types ¶
type THeader ¶
type THeader struct {
// contains filtered or unexported fields
}
THeader is tagged string, represents HTTP Header
func Authorization ¶
func Authorization() THeader
Authorization is syntax sugar of Header("Authorization")
func Header ¶
Header defines HTTP headers to the request, use combinator to define multiple header values.
http.HTTP( ø.Header("Accept").Is(...), ø.Header("Content-Type").Is(...), )