httpjson

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2018 License: Apache-2.0 Imports: 5 Imported by: 1

README

A simple http client for posting a json payload and receiving a json response.

Documentation

Index

Constants

View Source
const ApplicationJson = "application/json"

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpJson

type HttpJson struct {
	// contains filtered or unexported fields
}

func New

func New(maxIdle int, requestTimeout int) *HttpJson

func NewWithClient

func NewWithClient(client *http.Client) *HttpJson

func (*HttpJson) Get

func (c *HttpJson) Get(url string, response interface{}) error

func (*HttpJson) Post

func (c *HttpJson) Post(url string, request interface{}, response interface{}) error

Jump to

Keyboard shortcuts

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