internal

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MPL-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 P0ProviderData

type P0ProviderData struct {
	BaseUrl        string
	Authentication string
	Client         *http.Client
}

Like http.Client, except:

  • handles authentication
  • converts to/from JSON
  • treats response codes 400 and higher as errors

func Configure added in v0.3.0

func (*P0ProviderData) Delete added in v0.3.0

func (data *P0ProviderData) Delete(path string) (*http.Response, error)

func (*P0ProviderData) Do

func (data *P0ProviderData) Do(req *http.Request, responseJson any) (*http.Response, error)

func (*P0ProviderData) Get

func (data *P0ProviderData) Get(path string, responseJson any) (*http.Response, error)

func (*P0ProviderData) Post

func (data *P0ProviderData) Post(path string, requestJson any, responseJson any) (*http.Response, error)

func (*P0ProviderData) Put added in v0.3.0

func (data *P0ProviderData) Put(path string, requestJson any, responseJson any) (*http.Response, error)

Jump to

Keyboard shortcuts

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