Documentation
¶
Index ¶
- type HttpTester
- func (h *HttpTester) DELETE(uri string, param interface{}) (int, *e.Response)
- func (h *HttpTester) GET(uri string) (int, *e.Response)
- func (h *HttpTester) PATCH(uri string, param interface{}) (int, *e.Response)
- func (h *HttpTester) POST(uri string, param interface{}) (int, *e.Response)
- func (h *HttpTester) PUT(uri string, param interface{}) (int, *e.Response)
- type HttpTesterInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpTester ¶
type HttpTester struct {
// contains filtered or unexported fields
}
func (*HttpTester) DELETE ¶
func (h *HttpTester) DELETE(uri string, param interface{}) (int, *e.Response)
DELETE 模擬 Delete Request的動作
func (*HttpTester) GET ¶
func (h *HttpTester) GET(uri string) (int, *e.Response)
Get 模擬Get Request的動作
func (*HttpTester) PATCH ¶
func (h *HttpTester) PATCH(uri string, param interface{}) (int, *e.Response)
PATCH 模擬 Patch Request的動作
type HttpTesterInterface ¶
type HttpTesterInterface interface {
GET(uri string) (int, *e.Response)
POST(uri string, param interface{}) (int, *e.Response)
PUT(uri string, param interface{}) (int, *e.Response)
PATCH(uri string, param interface{}) (int, *e.Response)
DELETE(uri string, param interface{}) (int, *e.Response)
}
func NewHttpTester ¶
func NewHttpTester(router *gin.Engine) HttpTesterInterface
Click to show internal directories.
Click to hide internal directories.