restclient

package
v0.0.0-...-319b14c Latest Latest
Warning

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

Go to latest
Published: Dec 5, 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 Rest

type Rest struct {
	// contains filtered or unexported fields
}

Rest client to make http request

func New

func New() *Rest

New get new rest client

func (*Rest) Delete

func (r *Rest) Delete(url *types.URI) int

Delete http request

func (*Rest) Get

func (r *Rest) Get(url *types.URI) (int, string)

Get http request

func (*Rest) Post

func (r *Rest) Post(url *types.URI, data []byte) (int, error)

Post with data

func (*Rest) PostCloudEvent

func (r *Rest) PostCloudEvent(url *types.URI, e ce.Event) (int, error)

PostCloudEvent post an Cloud Event to the give url and check for error

func (*Rest) PostEvent

func (r *Rest) PostEvent(url *types.URI, e event.Event) error

PostEvent post an event to the give url and check for error

func (*Rest) PostWithReturn

func (r *Rest) PostWithReturn(url *types.URI, data []byte) (int, []byte)

PostWithReturn post with data and return data

func (*Rest) Put

func (r *Rest) Put(url *types.URI) int

Put http request

Jump to

Keyboard shortcuts

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