Mock your APIs in a really fast, robust and comprehensive way
426
Mock your APIs in a really fast, robust and comprehensive way
go get github.com/jaschweder/go-http-mock-server
Create a mock.json file like this:
{
"server":{
"address":"0.0.0.0",
"port":8080
},
"routes":[
{
"request":{
"method":"GET",
"url":"/hello"
},
"response":{
"status":200,
"body":"{\"message\": \"World!\"}"
}
}
]
}
Run gomock:
$ gomock mock.json
Try make a request:
$ curl http://localhost:8080/hello
{message: "World!"}
That's it! You rock!!!
Issue report and PR's are welcome
Created by Jonathan A. Schweder [email protected]
MIT
Content type
Image
Digest
Size
74.2 MB
Last updated
over 9 years ago
docker pull jaschweder/go-http-mock-server