Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPTestRequest ¶
type HTTPTestRequest struct { // common Method string // server ServedURL string HandleFuncs []gin.HandlerFunc // client RequestURLWithParams string Payload map[string]interface{} Header http.Header }
HTTPTestRequest defines the request for testing.
type HTTPTestResponse ¶
HTTPTestResponse defines the response for testing.
func HTTPTest ¶
func HTTPTest(req HTTPTestRequest) (*HTTPTestResponse, error)
PostForTest sends a POST request to the given URL with the given body and the given header. Put the route handler functions to last handleFuncs
Click to show internal directories.
Click to hide internal directories.