rest

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Create(relativeUrl string, contentType string, payload []byte) (*http.Response, error)
	Put(relativeUrl string, contentType string, payload []byte) (*http.Response, error)
	Get(relativeUrl string) (*http.Response, error)
	Delete(relativeUrl string) error
	Proxy(method string, relativeUrl string, payload []byte) (*http.Response, error)
	ServerInfo() (*http.Response, error)
	ServerURL() string
}

func NewRESTClient

func NewRESTClient(serverUrl string) Interface

type RESTClient

type RESTClient struct {
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

func (*RESTClient) Create

func (c *RESTClient) Create(relativeUrl string, contentType string, payload []byte) (*http.Response, error)

func (*RESTClient) Delete

func (c *RESTClient) Delete(relativeUrl string) error

func (*RESTClient) Get

func (c *RESTClient) Get(relativeUrl string) (*http.Response, error)

func (*RESTClient) Proxy

func (c *RESTClient) Proxy(method string, relativeUrl string, payload []byte) (*http.Response, error)

func (*RESTClient) Put

func (c *RESTClient) Put(relativeUrl string, contentType string, payload []byte) (*http.Response, error)

func (*RESTClient) ServerInfo

func (c *RESTClient) ServerInfo() (*http.Response, error)

func (*RESTClient) ServerURL

func (c *RESTClient) ServerURL() string

Jump to

Keyboard shortcuts

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