Skip to content

Latest commit

 

History

History
15 lines (14 loc) · 397 Bytes

README.md

File metadata and controls

15 lines (14 loc) · 397 Bytes

rest

A simple wrapper around http client to make restful requests easier.

  • An example usage for a post request
client := DefaultClient()
client.URL = "http://example.com"
client.Headers = map[string]string{
	"ContentType": "application/json"
    "Authorization":"Bearer token"
}
client.Body = bytes.NewReader([]byte(`{"key": "value"}`))
client.Strategy = PostRequest{}
client.Send()