httpclient

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpTransportAuthProvider

type HttpTransportAuthProvider interface {
	AddAuthHeaders(req *http.Request)
}

type HttpTransportClient

type HttpTransportClient struct {
	Client *http.Client
	Config *HttpTransportClientConfig
}

func (*HttpTransportClient) AddAuthHeaders

func (t *HttpTransportClient) AddAuthHeaders(req *http.Request)

func (*HttpTransportClient) AddCommonHeaders

func (t *HttpTransportClient) AddCommonHeaders(req *http.Request)

func (*HttpTransportClient) GetJSON

func (t *HttpTransportClient) GetJSON(path string, out any, params ...HttpTransportClientParams) error

func (*HttpTransportClient) PostJSON

func (t *HttpTransportClient) PostJSON(path string, inn any, out any, params ...HttpTransportClientParams) error

func (*HttpTransportClient) PutJSON

func (t *HttpTransportClient) PutJSON(path string, inn any, out any, params ...HttpTransportClientParams) error

type HttpTransportClientConfig

type HttpTransportClientConfig struct {
	BaseURL      string
	AuthProvider HttpTransportAuthProvider
	Role         string
	Version      rorversion.RorVersion
}

type HttpTransportClientParams

type HttpTransportClientParams string
const (
	HttpTransportClientParamsNoAuth HttpTransportClientParams = "NOAUTH"
)

Jump to

Keyboard shortcuts

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