Registry / testing / gavv-httpexpect-v1

gavv-httpexpect-v1

JSON →
library1.1.3gogounverified

Package httpexpect helps with end-to-end HTTP and REST API testing.

go get gopkg.in/gavv/httpexpect.v1
INSTALL
IMPORT
SIG · GAVV-HTTPEXPECT-V1
G
gavv-httpexpect-v1
testinggov1.1.3
harness data pending
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") }
Debug
Known issues
breakingv1 is deprecated; use v2 (github.com/gavv/httpexpect/v2) for new projects.
fix
Migrate to github.com/gavv/httpexpect/v2
affects: >=1.0.0 <2.0.0
Upgrade
Version history
1.1.3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Amazon
1
Resources
gavv-httpexpect-v1 — go get gavv-httpexpect-v1 · libregistry