Name: shipped-demo-account
Owner: CiscoCloud
Description: Account microservice for shopping site demo.
Created: 2016-04-01 18:04:40.0
Updated: 2016-07-08 22:22:34.0
Pushed: 2016-05-24 01:42:52.0
Homepage: null
Size: 10
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a small Microservice example of simple Shopping Account API endpoint to be used with Shipped.
go run account.go
to start the server on localhost.curl -i http://localhost:8000
or view it on your web browsercted Result
/1.1 200 OK
: Tue, 19 Jan 2016 15:52:02 GMT
ent-Length: 160
ent-Type: text/html; charset=utf-8
l>
ead>
<title>An example layout</title>
head>
ody>
ccount is up and running.</p>
ry This command</p>
/p>
body>
ml>
POST /v1/account/
-i -H "Content-Type: application/json" -X POST -d '{"username":"nick","password":"123"}' http://localhost:8887/v1/account/
cted Result:
cess":true,
en": 12325343,
sage":"Successfully logged in"
url -H "Content-Type: application/json" -X POST -d @loginExamplePost.json http://localhost:8887/v1/account/
GET /v1/account/
-i -H "Content-Type: application/json" -X GET http://localhost:8887/v1/account/
cted Result:
cess":true,
sage":"Successfully logged out in"
GET /v1/session/
-i -H "Content-Type: application/json" -X GET http://localhost:8887/v1/session/
cted Result:
cess":true,
sage":"Successfully logged out in"