{"id":52342,"library":"gavv-httpexpect","title":"httpexpect","description":"Package httpexpect helps with end-to-end HTTP and REST API testing.","status":"active","version":"2.0.0+incompatible","language":"go","source_language":null,"source_url":"https://github.com/gavv/httpexpect","tags":["testing","http","rest","assertions"],"install":[{"cmd":"go get github.com/gavv/httpexpect","lang":"bash","label":"Install github.com/gavv/httpexpect"}],"dependencies":[],"imports":[{"symbol":"httpexpect","correct":"github.com/gavv/httpexpect"}],"quickstart":{"code":"package main\n\nimport (\n\t\"net/http\"\n\t\"testing\"\n\n\t\"github.com/gavv/httpexpect\"\n)\n\nfunc TestAPI(t *testing.T) {\n\thandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tw.Write([]byte(`{\"message\":\"hello\"}`))\n\t})\n\n\te := httpexpect.WithConfig(httpexpect.Config{\n\t\tBaseURL:  \"http://example.com\",\n\t\tReporter: httpexpect.NewAssertReporter(t),\n\t\tClient:   &http.Client{Transport: httpexpect.NewBinder(handler)},\n\t})\n\n\te.GET(\"/\").\n\t\tExpect().\n\t\tStatus(http.StatusOK).\n\t\tJSON().Object().\n\t\tValueEqual(\"message\", \"hello\")\n}","lang":"go","description":"Test an HTTP handler with fluent assertions."},"warnings":[{"fix":"Use v2 API: httpexpect.WithConfig instead of httpexpect.New.","message":"Version 2.0.0+incompatible uses a different API than v1; check migration guide.","severity":"breaking","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'api':13 'assert':18 'end':7,9 'end-to-end':6 'help':4 'http':10,16 'httpexpect':1,3 'packag':2 'rest':12,17 'test':14,15","created_at":"2026-06-15T06:51:12.085381+00:00","updated_at":"2026-06-15T06:51:12.085381+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/gavv/httpexpect","github":"https://github.com/gavv/httpexpect","docs":"https://pkg.go.dev/github.com/gavv/httpexpect#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","http-client"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}