Documentation
¶
Index ¶
- Constants
- func Get(serviceName string, path string, headers map[string]string, ...) (int, error)
- func GetUrl(url string, headers map[string]string, params map[string]interface{}, ...) (int, error)
- func Post(serviceName string, path string, headers map[string]string, ...) (int, error)
- func PostFile(url string, headers map[string]string, params map[string]interface{}, ...) (int, error)
- func PostJSON(serviceName string, path string, headers map[string]string, params interface{}, ...) (int, error)
- func PostJSONUrl(url string, headers map[string]string, params interface{}, result interface{}) (int, error)
- func PostUrl(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 HTTP_LOG_ENABLE_KEY = "server.http.log.params" )
Variables ¶
This section is empty.
Functions ¶
func PostJSONUrl ¶
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.