Categorygithub.com/bancek/httptester
repositorypackage
0.0.0-20241010115417-113174ff76d1
Repository: https://github.com/bancek/httptester.git
Documentation: pkg.go.dev

# README

httptester

Go HTTP testing DSL

Example

GET("/").Do().Status(409).Contains("Already exists")

result := &SearchResult{}
GET("/search").Q("query", "test").Do().Status(200).JSON(&result)

newArticle := &Article{}
POST("/articles/").JSON(&Article{
  Title: "Test",
  Content: "Lorem ipsum",
}).Do().Status(201).JSON(&newArticle)

See request_test.go for more info.