Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1002 Bytes

README.md

File metadata and controls

42 lines (30 loc) · 1002 Bytes

xhttp

GoDoc Go Report Card

xhttp provides a custom http client based on net/http.

Description

The package provides an http client with the following features:

  • Customized timeouts
  • Proper handling of response Body
  • Method for file downloading
  • Ability to send plain net/http.Request
  • Convenient methods to set up headers of a request

Install

go get github.com/golocron/xhttp

Examples

Examples can be found here

go run examples/examples.go

2019/05/10 21:03:52 http request succeeded: method GET, body:
{
  "args": {},
  "headers": {
    "Accept-Encoding": "gzip",
    "Host": "httpbin.org",
    "User-Agent": "Go-http-client/1.1"
  },
  "origin": "127.0.0.1",
  "url": "https://httpbin.org/get"
}