httpex

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 8 Imported by: 0

README

httpex

[IN PROGRESS]

My HTTP Go package to make http requests easy to implement

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(url string, data string) ([]byte, error)

Connect: HTTP Connect method

func Delete

func Delete(url string, data string) ([]byte, error)

Delete: HTTP Delete method

func FmtHTML

func FmtHTML(body []byte) string

FmtHTML: From bytes to HTML (string)

func FmtJSON

func FmtJSON(body []byte) (string, error)

FmtJSON: From bytes to JSON (string)

func Get

func Get(url string) ([]byte, error)

Get: HTTP Get method

func Head(url string) ([]byte, error)

Head: HTTP Head method

func Options

func Options(url string, data string) ([]byte, error)

Options: HTTP Options method

func Patch

func Patch(url string, data string) ([]byte, error)

Patch: HTTP Patch method

func Post

func Post(url string, data string) ([]byte, error)

Post: HTTP Post method

func Put

func Put(url string, data string) ([]byte, error)

Put: HTTP Put method

func Request

func Request(method string, url string, data string) ([]byte, error)

Request: Make HTTP request

func ToString

func ToString(body []byte) string

ToString: From byte to string

func Trace

func Trace(url string, data string) ([]byte, error)

Trace: HTTP Trace method

Types

type ClientOpt

type ClientOpt struct {
	Timeout time.Duration
}

Jump to

Keyboard shortcuts

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