common

package
v0.0.0-...-77f4496 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentTypeHeader = "Content-Type"
	OriginHeader      = "Origin"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseClient

type BaseClient struct {
	Client  *http.Client
	Address string
}

func NewBaseClient

func NewBaseClient(client *http.Client, address string) *BaseClient

func (*BaseClient) Delete

func (c *BaseClient) Delete(url string) (*http.Response, error)

func (*BaseClient) Do

func (c *BaseClient) Do(req *http.Request) (*http.Response, error)

func (*BaseClient) Get

func (c *BaseClient) Get(url string) (*http.Response, error)

func (*BaseClient) Patch

func (c *BaseClient) Patch(url, contentType string, body io.Reader) (*http.Response, error)

func (*BaseClient) Post

func (c *BaseClient) Post(url, contentType string, body io.Reader) (*http.Response, error)

func (*BaseClient) Put

func (c *BaseClient) Put(url, contentType string, body io.Reader) (*http.Response, error)

func (*BaseClient) Request

func (c *BaseClient) Request(method, url, contentType string, body io.Reader) (*http.Response, error)

Jump to

Keyboard shortcuts

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