jsonapi

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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 for issuing HTTP requests.

func NewClient

func NewClient(host string, port uint16, tlsConfig *tls.Config) *Client

NewClient returns a new HTTP client.

func (*Client) Delete

func (c *Client) Delete(path string, body []byte) (*Response, error)

Delete sends an HTTP DELETE request.

func (*Client) Get

func (c *Client) Get(path string) (*Response, error)

Get sends an HTTP GET request.

func (*Client) Post

func (c *Client) Post(path string, body []byte) (*Response, error)

Post sends an HTTP POST request.

func (*Client) Put

func (c *Client) Put(path string, body []byte) (*Response, error)

Put sends an HTTP PUT request.

func (*Client) ServerURL

func (c *Client) ServerURL() string

ServerURL returns the server URL configured for this client.

type Response

type Response struct {
	Status  int
	Headers *http.Header
	Body    []byte
}

Response for a request.

Jump to

Keyboard shortcuts

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