Help us shape the future of Go! Take the 2026 Go Developer Survey

requests

package module
v0.0.0-...-9420b80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package errors contains common business errors to be user all over the server.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadRequest  = errors.New("The request was invalid or cannot be served.")
	ErrBadResponse = errors.New("The response was invalid or cannot be served.")
)

Functions

This section is empty.

Types

type Args

type Args struct {
	AcceptableCode int
	Body           interface{}
	Path           string
	Method         string
	Headers        http.Header
	Username       string
	Password       string
}

type HTTPClient

type HTTPClient struct {
	Host string
	// contains filtered or unexported fields
}

func NewHTTPClient

func NewHTTPClient(host string) HTTPClient

func (*HTTPClient) MakeRequest

func (c *HTTPClient) MakeRequest(args Args) (http.Header, int, []byte, error)

type InvalidHostError

type InvalidHostError struct {
	// contains filtered or unexported fields
}

func NewInvalidHostError

func NewInvalidHostError(err error) InvalidHostError

func (InvalidHostError) Error

func (err InvalidHostError) Error() string

type RequestError

type RequestError struct {
	// contains filtered or unexported fields
}

func NewRequestError

func NewRequestError(err error) RequestError

func (RequestError) Error

func (err RequestError) Error() string

type ResponseError

type ResponseError struct {
	// contains filtered or unexported fields
}

func NewResponseError

func NewResponseError(err error) ResponseError

func (ResponseError) Error

func (err ResponseError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL