Documentation ¶
Index ¶
- func ValidateResponse(url string, resp *http.Response, respBody []byte) error
- type BadResponseCodeError
- type JSONClient
- func (jc *JSONClient) CallAPI(ctx context.Context, requestContext *RequestContext) ([]byte, *http.Response, error)
- func (jc *JSONClient) Get(ctx context.Context, req *RequestContext) ([]byte, *http.Response, error)
- func (jc *JSONClient) Post(ctx context.Context, req *RequestContext) ([]byte, *http.Response, error)
- func (jc *JSONClient) ScanToTarget(ctx context.Context, req *RequestContext, target interface{}) error
- func (jc *JSONClient) ScanToTargetRecoveringOnProxyFailure(ctx context.Context, req *RequestContext, target interface{}) error
- type RequestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BadResponseCodeError ¶
type BadResponseCodeError struct {
// contains filtered or unexported fields
}
func NewBadResponseCodeError ¶
func NewBadResponseCodeError(url string, resp *http.Response, respBody []byte) BadResponseCodeError
func (BadResponseCodeError) Error ¶
func (brce BadResponseCodeError) Error() string
type JSONClient ¶
type JSONClient struct{}
func NewJSONClient ¶
func NewJSONClient() *JSONClient
func (*JSONClient) CallAPI ¶
func (jc *JSONClient) CallAPI(ctx context.Context, requestContext *RequestContext) ([]byte, *http.Response, error)
func (*JSONClient) Get ¶
func (jc *JSONClient) Get(ctx context.Context, req *RequestContext) ([]byte, *http.Response, error)
func (*JSONClient) Post ¶
func (jc *JSONClient) Post(ctx context.Context, req *RequestContext) ([]byte, *http.Response, error)
func (*JSONClient) ScanToTarget ¶
func (jc *JSONClient) ScanToTarget(ctx context.Context, req *RequestContext, target interface{}) error
func (*JSONClient) ScanToTargetRecoveringOnProxyFailure ¶
func (jc *JSONClient) ScanToTargetRecoveringOnProxyFailure(ctx context.Context, req *RequestContext, target interface{}) error
Click to show internal directories.
Click to hide internal directories.