http_client

package
v0.0.0-...-3885ffa Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	Key   string
	Value string
}

type ExecutionError

type ExecutionError struct {
	Url    string
	Method string
	Err    error
}

func (*ExecutionError) Error

func (e *ExecutionError) Error() string

func (*ExecutionError) Unwrap

func (e *ExecutionError) Unwrap() error

type HttpClient

type HttpClient interface {
	Get(url string, headers, params []Arg) ([]byte, error)
	Post(url string, headers []Arg, body interface{}) ([]byte, error)
	Put(url string, headers []Arg, body interface{}) ([]byte, error)
	Delete(url string, headers []Arg) ([]byte, error)
}

func NewHttpClient

func NewHttpClient(timeout int) HttpClient

type MalformedRequestError

type MalformedRequestError struct {
	Request interface{}
	Err     error
}

func (*MalformedRequestError) Error

func (e *MalformedRequestError) Error() string

func (*MalformedRequestError) Unwrap

func (e *MalformedRequestError) Unwrap() error

type MarshalError

type MarshalError struct {
	Input interface{}
	Err   error
}

func (*MarshalError) Error

func (e *MarshalError) Error() string

func (*MarshalError) Unwrap

func (e *MarshalError) Unwrap() error

type RespBodyError

type RespBodyError struct {
	Body []byte
	Err  error
}

func (*RespBodyError) Error

func (e *RespBodyError) Error() string

func (*RespBodyError) Unwrap

func (e *RespBodyError) Unwrap() error

type UnmarshalError

type UnmarshalError struct {
	Output interface{}
	Err    error
}

func (*UnmarshalError) Error

func (e *UnmarshalError) Error() string

func (*UnmarshalError) Unwrap

func (e *UnmarshalError) Unwrap() error

Jump to

Keyboard shortcuts

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