httpClient

package
v1.5.4-rc Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client base http client struct

func NewClient

func NewClient(baseURL string, defaultHeaders map[string]string) *Client

NewClient creates new Client

func NewClientTimeout

func NewClientTimeout(baseURL string, defaultHeaders map[string]string, timeout time.Duration) *Client

NewClientTimeout creates new Client with predefined timeout

func (*Client) Request

func (c *Client) Request(method string, resourceURI string, body interface{}, headers map[string]string) (Response, error)

Request creates httpRequest and returns response

type Response

type Response struct {
	StatusCode int
	Body       []byte
}

Jump to

Keyboard shortcuts

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