Documentation
¶
Overview ¶
Author: Daniel TAN Date: 2021-10-02 01:05:20 LastEditors: Daniel TAN LastEditTime: 2021-10-02 01:06:29 FilePath: /trinity-micro/core/requests/interface.go Description:
Author: Daniel TAN Date: 2021-09-03 12:24:12 LastEditors: Daniel TAN LastEditTime: 2021-09-28 01:11:13 FilePath: /pmpm_reporting_api/Users/danieltan/Workspace/trinity-micro/core/requests/mime.go Description:
Author: Daniel TAN Date: 2021-09-03 12:24:12 LastEditors: Daniel TAN LastEditTime: 2021-10-04 15:41:51 FilePath: /pmpm_reporting_api/Users/danieltan/Workspace/trinity-micro/core/requests/requests.go Description:
Index ¶
Constants ¶
const ( HeaderMime = "Content-Type" HeaderDate = "Date" HeaderAuthorization = "Authorization" HeaderXPhumacAlgo = "X-Phumac-Algo" HeaderKeyContentMD5 = "Content-MD5" )
const ( MimeJson = "application/json" MimeTextXML = "text/xml" MimeTextHTML = "text/html" MimeXML = "application/xml" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpRequest ¶ added in v0.1.2
type HttpRequest struct { }
func (*HttpRequest) Call ¶ added in v0.1.2
func (r *HttpRequest) Call(ctx context.Context, method string, url string, header http.Header, body interface{}, dest interface{}, requestInterceptors ...Interceptor) error
Call will return the err when the response code is not >=200 or <= 300 will decode the response to dest even it return error