Sign inSign up

apiprimer/hello-go

By apiprimer

Updated over 1 year ago

Hello REST API using golang

Image
Languages & frameworks
0

353

apiprimer/hello-go repository overview

This is a Hello API, which exposes two endpoints, GET and POST and return the response in the following structure,

{"from":"Go","message":"Hello, Go!","status":true}

Pull the image and run them on desired port. To test the endpoints use curl or another API testing tool.

GET

curl http://localhost:8080/
{"from":"Go","message":"Hello, Go!","status":true}

POST

curl http://localhost:8080/ -X POST -H 'Content-Type: application/json' --data '{"name":"YOUR_NAME"}
{"from":"Go","message":"Hello, YOUR_NAME!","status":true}

Tag summary

Content type

Image

Digest

sha256:0ea606f36

Size

7.5 MB

Last updated

over 1 year ago

docker pull apiprimer/hello-go