Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallWithResult ¶
CallWithResult sends request and set result.
Types ¶
type Method ¶
type Method string
Method is HTTP Method.
type Option ¶
type Option struct { URL string Method Method Headers map[string]string Timeout time.Duration Retry bool Debug bool Plugins []plugin.Plugin UserAgent string // Basic Auth User string Pass string // Authorization Bearer: Bearer string // Query Parameter Query interface{} // Body Parameter Payload interface{} // PayloadType is used for body payload type PayloadType PayloadType // Custom content-type ContentType string }
Option is wrapper struct of http option
type PayloadType ¶
type PayloadType string
PayloadType is payload type for POST
var ( PayloadTypeBODY PayloadType = "BODY" PayloadTypeJSON PayloadType = "JSON" PayloadTypeXML PayloadType = "XML" PayloadTypeFORM PayloadType = "FORM" PayloadTypeDATA PayloadType = "DATA" PayloadTypeSTREAM PayloadType = "STREAM" )
POST Payload type variables
type Response ¶
type Response struct {
*gentleman.Response
}
Response is wrapper struct of *gentleman.Response
func (Response) HasStatusCodeError ¶ added in v0.1.1
HasStatusCodeError returns error if HTTP status code is not 2xx code.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.