Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // BadRequestError - the client sent an invalid request BadRequestError = &RequestError{"bad request"} // ConflictError - the request created a data conflict ConflictError = &RequestError{"conflict"} // RequestFailedError - the request failed RequestFailedError = &RequestError{"request failed"} // InvalidResponseError - the response is invalid InvalidResponseError = &RequestError{"response invalid"} // ServerError - the server returned a 5xx error ServerError = &RequestError{"internal server error"} // MaxRetriesError - the request has hit the maximum retries MaxRetriesError = &RequestError{"maximum retries reached"} // ResourceNotFound - the requested resource is not found ResourceNotFound = &RequestError{"resource not found"} // UnprocessableError - the request was not processable UnprocessableError = &RequestError{"unprocessable"} )
Functions ¶
func DoRequest ¶
func DoRequest(params RequestParams) ([]byte, error)
DoRequest - The underlying function for Get/Post/Put/Delete
Types ¶
type RequestError ¶
type RequestError struct {
ErrorString string
}
RequestError - Generic error for requester
func (*RequestError) Error ¶
func (re *RequestError) Error() string
Error - returns the error string
Click to show internal directories.
Click to hide internal directories.