Documentation ¶
Index ¶
- Constants
- func Get(serviceName string, path string, params map[string]interface{}, ...) (int, error)
- func GetUrl(url string, params map[string]interface{}, result interface{}) (int, error)
- func Post(serviceName string, path string, params map[string]interface{}, ...) (int, error)
- func PostFile(url string, params map[string]interface{}, files map[string]*request.File, ...) (int, error)
- func PostJSON(serviceName string, path string, params interface{}, result interface{}) (int, error)
- func PostJSONString(serviceName string, path string, params string, result interface{}) (int, error)
- func PostJSONStringUrl(url string, params string, result interface{}) (int, error)
- func PostJSONUrl(url string, params interface{}, result interface{}) (int, error)
- func PostJSONWithHeader(serviceName string, path string, headers map[string]string, params interface{}, ...) (int, error)
- func PostJSONWithHeaderUrl(url string, headers map[string]string, params interface{}, result interface{}) (int, error)
- func PostUrl(url string, params map[string]interface{}, result interface{}) (int, error)
- func PostWithHeader(serviceName string, path string, headers map[string]string, ...) (int, error)
- func PostWithHeaderUrl(url string, headers map[string]string, params map[string]interface{}, ...) (int, error)
- type Decoder
- type JSONDecoder
- type StreamDecoder
- type StringDecoder
Constants ¶
View Source
const ( MEDIA_JSON = "application/json" MEDIA_PLAIN = "text/plain" MEDIA_HTML = "text/html" MEDIA_XML = "text/xml" )
View Source
const ( // PROTOCOL_HTTP = "http://" // PROTOCOL_HTTPS = "https://" DEFAULT_TIMEOUT = 10 )
Variables ¶
This section is empty.
Functions ¶
func PostJSONString ¶
func PostJSONStringUrl ¶
func PostJSONUrl ¶
func PostJSONWithHeader ¶
func PostJSONWithHeaderUrl ¶
func PostWithHeader ¶
Types ¶
type Decoder ¶
func GetDecoder ¶
type JSONDecoder ¶
type JSONDecoder struct{}
func (JSONDecoder) DecoderObj ¶
func (d JSONDecoder) DecoderObj(resp []byte, obj interface{}) (Decoder, error)
type StreamDecoder ¶
type StreamDecoder struct{}
func (StreamDecoder) DecoderObj ¶
func (d StreamDecoder) DecoderObj(resp []byte, obj interface{}) (Decoder, error)
type StringDecoder ¶
type StringDecoder struct{}
func (StringDecoder) DecoderObj ¶
func (d StringDecoder) DecoderObj(resp []byte, obj interface{}) (Decoder, error)
Click to show internal directories.
Click to hide internal directories.