request

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRequest

type IRequest interface {
	NewHTTPRequest(method, url string, body interface{}, headers map[string]string) (*http.Request, error)
	DoRequest(request *http.Request, tlsConfig *tls.Config) (*entities.HTTPResponse, error)
}

func NewHTTPRequestService

func NewHTTPRequestService(timeout int) IRequest

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) DoRequest

func (m *Mock) DoRequest(_ *http.Request, _ *tls.Config) (*entities.HTTPResponse, error)

func (*Mock) NewHTTPRequest

func (m *Mock) NewHTTPRequest(_, _ string, _ interface{}, _ map[string]string) (*http.Request, error)

type Request

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

func (*Request) DoRequest

func (r *Request) DoRequest(request *http.Request, tlsConfig *tls.Config) (*entities.HTTPResponse, error)

func (*Request) NewHTTPRequest

func (r *Request) NewHTTPRequest(method, url string, body interface{},
	headers map[string]string) (*http.Request, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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