uhttp

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: MIT Imports: 6 Imported by: 0

README

HTTP utility

This package defines internal HTTP utilities.

Methods

NewHTTPRequest(method string, url string, bodyString string, header map[string]string) (string, error)

Example

method := "GET"
url := "https://api.blockcypher.com/v1/btc/test3/addrs/mtXWDB6k5yC5v7TcwKZHB89SUp85yCKshy?unspentOnly=true"
response, err := uhttp.NewHttpRequest(method, url, "", nil)
if err != nil {
  fmt.Println("An error occurred:", err)
  return
}

fmt.Println("Response:", response)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPRequest

func NewHTTPRequest(method string, url string, bodyString string, header map[string]string) (int, string, error)

NewHTTPRequest function builds http call @param method <string>: http method @param url <string>: URL http to call @return <string>, error

Types

This section is empty.

Jump to

Keyboard shortcuts

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