Post request, return custom json format
(result interface{}, urlStr string, body interface{}, opts ...Option)
| 382 | |
| 383 | // Post request, return custom json format |
| 384 | func Post(result interface{}, urlStr string, body interface{}, opts ...Option) error { |
| 385 | o := defaultOptions() |
| 386 | o.apply(opts...) |
| 387 | return do("POST", result, urlStr, body, o.params, o.headers, o.timeout) |
| 388 | } |
| 389 | |
| 390 | // Put request, return custom json format |
| 391 | func Put(result interface{}, urlStr string, body interface{}, opts ...Option) error { |