requests

package
v0.0.0-...-6797358 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller

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

func NewCaller

func NewCaller(baseUrl string, headers map[string]string, cookies map[string]string) *Caller

func (*Caller) Client

func (s *Caller) Client() *HttpRequest

func (*Caller) Delete

func (s *Caller) Delete(path string, inputValue interface{}, outputRef interface{}) ([]byte, *httpclient.Response, error)

func (*Caller) Get

func (s *Caller) Get(path string, inputValue interface{}, outputRef interface{}) ([]byte, *httpclient.Response, error)

func (*Caller) Patch

func (s *Caller) Patch(path string, inputValue interface{}, outputRef interface{}) ([]byte, *httpclient.Response, error)

func (*Caller) Post

func (s *Caller) Post(path string, inputValue interface{}, outputRef interface{}) ([]byte, *httpclient.Response, error)

func (*Caller) PostForm

func (s *Caller) PostForm(path string, inputValue interface{}, outputRef interface{}) ([]byte, *httpclient.Response, error)

func (*Caller) Put

func (s *Caller) Put(path string, inputValue interface{}, outputRef interface{}) ([]byte, *httpclient.Response, error)

func (*Caller) SetBearer

func (s *Caller) SetBearer(bearer string)

type HttpRequest

type HttpRequest struct {
	*httpclient.HttpClient
	// contains filtered or unexported fields
}

func NewHttpRequest

func NewHttpRequest(headers, cookies map[string]string, options map[int]interface{}) *HttpRequest

func (*HttpRequest) Call

func (s *HttpRequest) Call(method string, url string, value interface{}, headers map[string]string) (*httpclient.Response, error)

func (*HttpRequest) GetJsoniter

func (s *HttpRequest) GetJsoniter() jsoniter.API

func (*HttpRequest) PostFile

func (s *HttpRequest) PostFile(url string, form map[string]string, files []PostFile) (*httpclient.Response, error)

PostFile PostFile.Content will not close after PostFile

type PostFile

type PostFile struct {
	Field    string
	FileName string
	Content  io.Reader
}

type Resty

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

func (*Resty) Get

func (s *Resty) Get() *resty.Client

func (*Resty) WithJSON

func (s *Resty) WithJSON() *Resty

func (*Resty) WithRetry

func (s *Resty) WithRetry() *Resty

func (*Resty) WithTLS

func (s *Resty) WithTLS() *Resty

Jump to

Keyboard shortcuts

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