Repo displays a simple HTTP request-response, using JSON objects. It can be used to simulate a client request (from Python, using the requests module) and a corresponding server response (from Golang, using the gin module).
Instructions
Install and set up go && postgres psql
Set up Python3.4 and pip3
Install requests module using the following command sudo pip3 install requests
Install gin using the following command go get github.com/gin-gonic/gin
Install postgres psql package using command go get github.com/jackc/pgx
Install this module for http requests go get github.com/parnurzeal/gorequest
Clone the repo
On one terminal window (say t1), run go run server.go
On another terminal window (say t2), run cd API
run create_table.py deletes the existing entries of users and usersdescription tables if table exists , else create tables
run createuserid.py check and validate an email with it's userid
run dumpintousers.py dump data into users table
run dumpintousersdescription.py dump data into usersdescription table
run findDeviceidPlatform.py it finds the deviceid and platform
On another terminal window, run python3.4 findDeviceidPlatform.py
The request should be visible on server.go and the corresponding response should be visible on the terminal running the python program