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.
Click to show internal directories.
Click to hide internal directories.