Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
httpexpect
✓ gopkg.in/gavv/httpexpect.v1
Creates an HTTP expectation against a test server.
package main
import (
"net/http/httptest"
"gopkg.in/gavv/httpexpect.v1"
)
func main() {
handler := func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("ok")) }
server := httptest.NewServer(http.HandlerFunc(handler))
defer server.Close()
e := httpexpect.New(t, server.URL)
e.GET("/").Expect().Status(http.StatusOK).Body().Equal("ok")
}
Upgrade
Version history
1.1.3latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.