cora

package module
v0.0.0-...-0a398e9 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cora

type Cora interface {
	Get(string, ...Header) Response
	Head(string, ...Header) Response
	Post(string, interface{}, ...Header) Response
	Put(string, interface{}, ...Header) Response
	Delete(string, ...Header) Response
	Options(string, ...Header) Response
	Patch(string, interface{}, ...Header) Response
	SetHost(string) Cora
	SetHeaders(...Header) Cora
}

func Http

func Http() Cora

Http cora instance

func Http2

func Http2() Cora

Http2 cora instance

type Header struct {
	Name   string
	Values []string
}

type Response

type Response struct {
	Code int
	Err  error
	Body []byte
	Raw  *http.Response
}

func (Response) JSON

func (r Response) JSON(model interface{}) Response

JSON decode result

func (Response) XML

func (r Response) XML(model interface{}) Response

XML decode result

Jump to

Keyboard shortcuts

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