This repository has been archived on 2022-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
dex/vendor/github.com/mbanzon/simplehttp/helpers.go
2016-03-09 13:04:05 -08:00

17 lines
389 B
Go

package simplehttp
func (r *HTTPRequest) GetResponseFromJSON(v interface{}) error {
response, err := r.MakeGetRequest()
if err != nil {
return err
}
return response.ParseFromJSON(v)
}
func (r *HTTPRequest) PostResponseFromJSON(payload Payload, v interface{}) error {
response, err := r.MakePostRequest(payload)
if err != nil {
return err
}
return response.ParseFromJSON(v)
}