httpclient

package
v0.0.0-...-2bde531 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient struct {
	Request         *HTTPRequestClient
	Response        *HTTPResponseClient
	Body            []byte
	HeadersRequest  map[string]string
	HeadersResponse map[string]string
}

HTTPClient is object which contains *http data.

func Call

func Call(method types.Method, url types.URL, contentType string, data []byte, headers map[string]string, logger func(message string, mode string)) (*HTTPClient, error)

Call http method

func NewHTTPClient

func NewHTTPClient(response *http.Response, data []byte) *HTTPClient

NewHTTPClient returns an instance of HTTPClient object which contains *httpResponse and body.

type HTTPRequestClient

type HTTPRequestClient struct {
	Host   string
	Method string
	HTTP   string
	URL    string
	Body   string
}

HTTPRequestClient struct

type HTTPResponseClient

type HTTPResponseClient struct {
	Response       *http.Response
	Status         string
	StatusCode     string
	HTTP           string
	Contentlength  string
	ContentType    string
	Date           string
	Referrerpolicy string
	Connection     string
}

HTTPResponseClient struct

Jump to

Keyboard shortcuts

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