Patch request, return custom json format
(result interface{}, urlStr string, body interface{}, opts ...Option)
| 396 | |
| 397 | // Patch request, return custom json format |
| 398 | func Patch(result interface{}, urlStr string, body interface{}, opts ...Option) error { |
| 399 | o := defaultOptions() |
| 400 | o.apply(opts...) |
| 401 | return do("PATCH", result, urlStr, body, o.params, o.headers, o.timeout) |
| 402 | } |
| 403 | |
| 404 | var requestErr = func(err error) error { return fmt.Errorf("request error, err=%v", err) } |
| 405 | var jsonParseErr = func(err error) error { return fmt.Errorf("json parsing error, err=%v", err) } |