Documentation
¶
Index ¶
- Constants
- Variables
- func GoGetByUrl(url string) (*http.Response, error)
- func GoGetRequestByUrl(url string) (*http.Response, error)
- func GoPostJson(data interface{}, url string) (*http.Response, error)
- func HttpGetJson(url string) ([]byte, error)
- func HttpGetJsonWithHeader(url string, header map[string]string) ([]byte, error)
- func HttpPostJson(url string, params interface{}) ([]byte, error)
- func HttpPostJsonWithHeader(url string, params interface{}, header map[string]string) ([]byte, error)
- func PostJsonWithHeader(url string, header map[string]string, reqData any, rspData any) error
- func ResponseBytes(w http.ResponseWriter, bytes []byte, fileName string)
- func ResponseExcel(w http.ResponseWriter, f *excelize.File)
- func ResponseTextFile(w http.ResponseWriter, file *os.File)
Constants ¶
View Source
const ( ContentType = "Content-Type" ApplicationJson = "application/json" )
Variables ¶
View Source
var JsonHeader = map[string]string{ ContentType: ApplicationJson, }
Functions ¶
func GoPostJson ¶ added in v0.0.9
func HttpGetJson ¶ added in v0.0.7
func HttpGetJsonWithHeader ¶ added in v0.0.9
func HttpPostJson ¶ added in v0.0.2
func HttpPostJsonWithHeader ¶ added in v0.0.9
func PostJsonWithHeader ¶ added in v0.0.9
func ResponseBytes ¶ added in v0.0.4
func ResponseBytes(w http.ResponseWriter, bytes []byte, fileName string)
func ResponseExcel ¶ added in v0.0.4
func ResponseExcel(w http.ResponseWriter, f *excelize.File)
func ResponseTextFile ¶ added in v0.0.4
func ResponseTextFile(w http.ResponseWriter, file *os.File)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.