http

package module
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2019 License: MIT Imports: 0 Imported by: 0

README

http

Godoc Report Tests Coverage Sponsor

Provides HTTP utilities. Currently it offers a fast and easy-to-use HTTP client.

Installation

go get github.com/aerogo/http/client

Request

Basic GET request
response, err := client.Get("https://example.com").End()
Basic POST request
response, err := client.Post("https://example.com").End()
Sending request headers
response, err := client.Get("https://example.com").Header("Accept", "text/html").End()

Response

Response body as bytes
response.Bytes()
Response body as a string
response.String()
Status code
response.StatusCode()
Deserialize response body into an object (JSON)
response.Unmarshal(&obj)
Response body as bytes (without unzipping gzip contents)
response.Raw()
Response body as a string (without unzipping gzip contents)
response.RawString()
Response length (without unzipping gzip contents)
response.RawLength()

Style

Please take a look at the style guidelines if you'd like to make a pull request.

Sponsors

Cedric Fung Scott Rayapoullé Eduard Urbach
Cedric Fung Scott Rayapoullé Eduard Urbach

Want to see your own name here?

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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