Documentation ¶
Index ¶
- type Config
- type FakeClient
- type RealClient
- type Response
- type ResponseAdapter
- func (res *ResponseAdapter) AddTeardown(fn func() error)
- func (res *ResponseAdapter) Body() []byte
- func (res *ResponseAdapter) Buffer() *bytes.Buffer
- func (res *ResponseAdapter) Close() error
- func (res *ResponseAdapter) Code() int
- func (res *ResponseAdapter) Header() http.Header
- func (res *ResponseAdapter) JSONData() interface{}
- func (res *ResponseAdapter) LazyText() fmt.Stringer
- func (res *ResponseAdapter) ParseJSONData(val interface{}) error
- func (res *ResponseAdapter) Raw() *http.Response
- func (res *ResponseAdapter) Request() *http.Request
- func (res *ResponseAdapter) Text() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { BasePath string Body io.Reader Query url.Values Tripperwares tripperware.List }
Config :
type FakeClient ¶ added in v0.2.0
FakeClient :
func (*FakeClient) NewRequest ¶ added in v0.2.0
func (c *FakeClient) NewRequest( method string, path string, config *Config, ) (*http.Request, error)
NewRequest :
type RealClient ¶ added in v0.2.0
RealClient :
func (*RealClient) NewRequest ¶ added in v0.2.0
func (c *RealClient) NewRequest( method string, path string, config *Config, ) (*http.Request, error)
NewRequest :
type Response ¶
type Response interface { io.Closer Code() int Header() http.Header Request() *http.Request Raw() *http.Response // // Extractor : // type Extractor interface { ParseJSONData(val interface{}) error JSONData() interface{} Body() []byte Text() string LazyText() fmt.Stringer }
Response :
type ResponseAdapter ¶
type ResponseAdapter struct { GetResponse func() *http.Response // contains filtered or unexported fields }
ResponseAdapter :
func NewResponseAdapter ¶
func NewResponseAdapter(get func() *http.Response) *ResponseAdapter
NewResponseAdapter :
func (*ResponseAdapter) AddTeardown ¶
func (res *ResponseAdapter) AddTeardown(fn func() error)
func (*ResponseAdapter) Buffer ¶
func (res *ResponseAdapter) Buffer() *bytes.Buffer
Buffer : (TODO: rename)
func (*ResponseAdapter) Header ¶ added in v0.3.0
func (res *ResponseAdapter) Header() http.Header
Header :
func (*ResponseAdapter) ParseJSONData ¶
func (res *ResponseAdapter) ParseJSONData(val interface{}) error
ParseJSONData :
func (*ResponseAdapter) Raw ¶ added in v0.3.0
func (res *ResponseAdapter) Raw() *http.Response
Raw :
func (*ResponseAdapter) Request ¶ added in v0.3.0
func (res *ResponseAdapter) Request() *http.Request
Request :
Click to show internal directories.
Click to hide internal directories.