Documentation
¶
Index ¶
Constants ¶
View Source
const (
Slash = "/"
)
Variables ¶
This section is empty.
Functions ¶
func NormalizeEndpoint ¶
normalizeEndpoint Normalize Endpoint considering ending backslash need.
Types ¶
type Request ¶
type Request struct {
// Endpoint of the HTTP server. It might include a base path.
Endpoint string
// Path of the API endpoint. This path is considered with the endpoint to invoke the HTTP server.
Path string
// Query parameters
QueryParams map[string][]string
// Request headers
Headers map[string][]string
// HTTP method
Method string
// Request body as slice of bytes
RequestBody []byte
// Username for basic authentication
Username string
// Password for basic authentication
Password string
}
Request information of the Session.
func NewRequest ¶
func (*Request) AddAuthorization ¶
func (*Request) AddJSONHeaders ¶
func (r *Request) AddJSONHeaders()
AddJSONHeaders adds json headers to Request if they are null
func (*Request) AddQueryParams ¶
Click to show internal directories.
Click to hide internal directories.