request

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status struct {
	Ok      bool   `json:"ok"`
	Group   string `json:"group"`
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func Delete

func Delete(url string, header js.Json) (js.Json, Status)

Request delete method

func Get

func Get(url string, header js.Json) (js.Json, Status)

Request get method

func Options

func Options(url string, header js.Json) (js.Json, Status)

Request options method

func Patch

func Patch(url string, header, body js.Json) (js.Json, Status)

Request patch method

func Post

func Post(url string, header, body js.Json) (js.Json, Status)

Request post method

func Put

func Put(url string, header, body js.Json) (js.Json, Status)

Request put method

func StatusValid added in v0.0.2

func StatusValid(status int, message string) Status

Return true if status code is ok

func (Status) ToJson

func (s Status) ToJson() js.Json

ToJson returns a Json object

func (Status) ToString

func (s Status) ToString() string

ToString returns a string

Jump to

Keyboard shortcuts

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