httpx

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(url, token string, insecure bool) (*http.Response, error)

func Error

func Error(response *http.Response) error

Returns a golang error corresponding to the given http response.

func Get

func Get(url, token string, params url.Values, insecure bool) (*http.Response, error)

func GetText

func GetText(url, token string, params url.Values, insecure bool) (*http.Response, error)

func NewClient

func NewClient(insecure bool) *http.Client

func NewDelete

func NewDelete(url, token string) (*http.Request, error)

func NewGet

func NewGet(url, token string, params url.Values) (*http.Request, error)

func NewPatch

func NewPatch(url, token string, body interface{}) (*http.Request, error)

func NewPost

func NewPost(url, token string, body interface{}) (*http.Request, error)

func NewPut

func NewPut(url, token string, body interface{}) (*http.Request, error)

func NewRequest

func NewRequest(method, url string, body io.Reader) (*http.Request, error)

func Patch

func Patch(url, token string, body interface{}, insecure bool) (*http.Response, error)

func Post

func Post(url, token string, body interface{}, insecure bool) (*http.Response, error)

func Put

func Put(url, token string, body interface{}, insecure bool) (*http.Response, error)

Types

type GlogWrapper

type GlogWrapper struct {
}

GlogWrapper is used to wrap glog.info() in a Print() function usable by splunk-cloud-sdk-go

func (*GlogWrapper) Print

func (gw *GlogWrapper) Print(v ...interface{})

type HTTPError

type HTTPError struct {
	StatusCode int                    `json:"status,omitempty"`
	Code       string                 `json:"code,omitempty"`
	Message    string                 `json:"message,omitempty"`
	Details    map[string]interface{} `json:"details,omitempty"`
	MoreInfo   string                 `json:"moreInfo,omitempty"`
}

Represents a SSC error response

func (*HTTPError) Error

func (herr *HTTPError) Error() string

Jump to

Keyboard shortcuts

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