Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeStructureURL ¶
MakeStructureURL builds a URL by using the structured params as the query string of the url. e.g. MakeStructureURL("https://example.com/", &testParams{State: "test", UserName: "hello"}) returns "https://example.com/?state=test&user_name=hello"
func MakeTemplateURL ¶
MakeTemplateURL builds a URL by replacing the placeholders in the uri with the values in the params. e.g. MakeTemplateURL("https://example.com/:id", map[string]string{"id": "123"}) returns "https://example.com/123"
Types ¶
type RequestOptions ¶
type RequestOptions struct { // URI specifies the request's URI URI string // Method is the HTTP method Method string // ContentType is the HTTP content type ContentType string // JSONBody is the JSON body of the request JSONBody interface{} // Headers is the HTTP headers Headers []Header // Timeout is the HTTP timeout in seconds Timeout time.Duration }
RequestOptions represents the HTTP request options
Click to show internal directories.
Click to hide internal directories.