rest

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

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 7 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 {
	HTTPClient *http.Client
	Service    Service
}

Client is foobar

func (Client) Call

func (client Client) Call(request *http.Request) ([]byte, error)

Call makes the request using the client and returns the response bytes

func (Client) Curl

func (client Client) Curl(request *http.Request, target interface{}) error

Curl makes the request using the service interface functions and unmarshals the response into the target

func (Client) CurlSimple

func (client Client) CurlSimple(method string, endpoint *url.URL, payload interface{}, target interface{}) error

CurlSimple is foobar

type Service

type Service interface {
	ModRequest(request *http.Request) error
	ErrorCheck(responseBytes []byte) error
}

Service is foobar

Jump to

Keyboard shortcuts

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