httputils

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FastSend

func FastSend(target string, headers map[string]string, origin *http.Request) (data []byte, statusCode int, contentType string, err error)

func HttpDelete

func HttpDelete(url string, headers map[string]string, body []byte) (data []byte, statusCode int, err error)

HttpDelete 发送http delete请求

func HttpGet

func HttpGet(path string, headers map[string]string) (data []byte, statusCode int, err error)

HttpGet 发送http get请求

func HttpPost

func HttpPost(url string, headers map[string]string, body []byte) (data []byte, statusCode int, err error)

HttpPost 发送http post请求

func HttpProxy

func HttpProxy(serviceUrl string, w http.ResponseWriter, r *http.Request)

HttpProxy http代理

func HttpPut

func HttpPut(url string, headers map[string]string, body []byte) (data []byte, statusCode int, err error)

HttpPut 发送http put请求

func HttpRequest

func HttpRequest(method, path string, headers map[string]string, body []byte) (data []byte, statusCode int, err error)

HttpRequest 发送http请求

func SendRequest

func SendRequest(req *http.Request) (data []byte, statusCode int, err error)

func TransmitRequest

func TransmitRequest(path string, origin *http.Request) (data []byte, statusCode int, contentType string, err error)

TransmitRequest 转发http请求

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL