curl

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Curl

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

Curl handles network requests

func NewCurl

func NewCurl(url string) *Curl

NewCurl returns a new Curl instance

func (*Curl) Delete

func (a *Curl) Delete(path string, withAuth bool) (responseBody []byte, statusCode int)

Delete does a DELETE request

func (*Curl) Get

func (a *Curl) Get(path string, withAuth bool) (responseBody []byte, statusCode int)

Get does a GET request

func (*Curl) GetAuthKey

func (a *Curl) GetAuthKey() string

GetAuthKey returns the authentication key

func (*Curl) Post

func (a *Curl) Post(path string, body interface{}, authenticated bool) (responseBody []byte, statusCode int)

Post does a post request

func (*Curl) Put

func (a *Curl) Put(path string, body interface{}, authenticated bool) (responseBody []byte, statusCode int)

Put does a PUT request

func (*Curl) SetAuthKey

func (a *Curl) SetAuthKey(authKey string)

SetAuthKey sets the auth key

Jump to

Keyboard shortcuts

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