synchttp

package
v0.0.0-...-fe13f99 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package synchttp writes JSON to an endpoint and waits for a response.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONWriter

type JSONWriter interface {
	// url is the endpoint of the rest API. headers are any additional
	// content headers to be written besides "Content-Type: application/json";
	// payload is marshalled into JSON.
	Write(url string, headers http.Header, payload interface{}) error
}

JSONWriter posts json to a rest API.

func NewSyncJSONWriter

func NewSyncJSONWriter() (JSONWriter, error)

NewSyncJSONWriter creates a synchronous json writer.

Jump to

Keyboard shortcuts

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