Skip to content
/ xhttp Public

Custom http client based on net/http

Notifications You must be signed in to change notification settings

golocron/xhttp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
}

About

Custom http client based on net/http

Resources

Stars

Watchers

Forks

Releases

No releases published