httpreq

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: Unlicense Imports: 5 Imported by: 0

README

GO HTTP REQUEST

This dependencies for rumahlogic's developer team only.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

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

func (*Request) Do

func (this *Request) Do() (response Response, err error)

func (*Request) Init

func (this *Request) Init(method, url_ string, payload interface{}, headers ...string)

func (*Request) SetHeader

func (this *Request) SetHeader(headers ...string)

func (*Request) SetMethod

func (this *Request) SetMethod(method string)

func (*Request) SetPayload

func (this *Request) SetPayload(payload interface{})

func (*Request) SetUrl

func (this *Request) SetUrl(url_ string)

type Response

type Response struct {
	Body       []byte
	Status     string
	StatusCode int
}

func NewRequest

func NewRequest(method, url string, payload interface{}, headers ...string) (response Response, err error)

Jump to

Keyboard shortcuts

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