Documentation ¶
Index ¶
- func PostWithHeadersWithNoRedirect(u string, headers http.Header, data models.FileData) (*http.Response, error)
- type Request
- func (r *Request) Get(url string) (*Response, error)
- func (r *Request) Post(url string, data models.FileData) (*Response, error)
- func (r *Request) PostMultipartForm(url, contentType string, reader io.Reader) (*Response, error)
- func (r *Request) PostWithoutHeader(u string, data models.FileData) (*Response, error)
- func (r *Request) Put(url string, data models.FileData) (*Response, error)
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request integrates some methods of network request
func (*Request) Post ¶
Post uses the `post` method and the specified request body to make a request to the specified URL and get a response
func (*Request) PostMultipartForm ¶
PostMultipartForm uses the `post` method to make a request with a file as the request body
func (*Request) PostWithoutHeader ¶
PostWithoutHeader uses the `post` method and the specified request body to send a request without request headers to the specified URL and get a response
Click to show internal directories.
Click to hide internal directories.