SetResultStateCheckFunc overrides the default result state checker with customized one, which returns SuccessState when HTTP status `code >= 200 and <= 299`, and returns ErrorState when HTTP status `code >= 400`, otherwise returns UnknownState.
(fn func(resp *Response) ResultState)
| 212 | // which returns SuccessState when HTTP status `code >= 200 and <= 299`, and returns |
| 213 | // ErrorState when HTTP status `code >= 400`, otherwise returns UnknownState. |
| 214 | func (c *Client) SetResultStateCheckFunc(fn func(resp *Response) ResultState) *Client { |
| 215 | c.resultStateCheckFunc = fn |
| 216 | return c |
| 217 | } |
| 218 | |
| 219 | // SetCommonFormDataFromValues set the form data from url.Values for requests |
| 220 | // fired from the client which request method allows payload. |
no outgoing calls