httpmock:Go中的轻量级HTTP模拟(又名golang)

时间:2021-02-03 19:55:56
【文件属性】:
文件名称:httpmock:Go中的轻量级HTTP模拟(又名golang)
文件大小:9KB
文件格式:ZIP
更新时间:2021-02-03 19:55:56
mock golang http httptest HTTPGo httpmock 该库建立在Go内置的库的基础上,添加了一个更具可界面,可以轻松地与其他工具(如。 它通过提供一个将HTTP组件作为单独的参数而不是单个*http.Request对象的Handler来*http.Request 。 典型的接口为: type Handler interface { ServeHTTP ( ResponseWriter , * Request ) } 该库为服务器提供了具有以下接口的服务器,该接口自然可与模拟库一起使用: // Handler is the interface used by httpmock instead of http.Handl
【文件预览】:
httpmock-master
----.gitignore(275B)
----httpmock.go(5KB)
----README.md(3KB)
----mockhandler.go(3KB)
----LICENSE(1KB)
----go.mod(119B)
----okhandler.go(283B)
----go.sum(2KB)
----.travis.yml(27B)
----httpmock_test.go(2KB)

网友评论