httpadapter

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorNilData no data
	ErrorNilData = errors.New("no data to parse ")
	// ErrorNilAuth no auth service
	ErrorNilAuth = errors.New("no auth to parse ")
)

Functions

func New

func New(client HTTPClient, baseUrl string) *httpAdapter

New returns an httpAdapter

func NewJsonReader

func NewJsonReader(data interface{}) (io.Reader, error)

NewJsonReader returns a reader from a given data

func NewMultipartReader

func NewMultipartReader(data interface{}) (reader io.Reader, boundary string, err error)

NewMultipartReader returns a multipart reader from a given data

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient implementation

Jump to

Keyboard shortcuts

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