-
Notifications
You must be signed in to change notification settings - Fork 0
User signup
ryanv edited this page Sep 16, 2019
·
2 revisions
Using httpie
$ http POST :3000/v1/users user:='{"email": "example@gmail.com", "username":"some_user",
"first_name":"John", "last_name": "Doe"}'
Using curl
$ curl --include --request POST http://localhost:3000/v1/users --form "user[username]=some_user"
--form "user[email]=example@gmail.com"
--form "user[first_name]=John"
--form "user[last_name]=Doe"
Sample response
{
"data": {
"bio": "Laboriosam neque aut. Quibusdam voluptatem rerum. Quod optio ipsum.",
"birthday": "1971-04-26",
"cover_pic": null,
"created_at": "2019-09-16T01:48:28.445Z",
"email": "example@gmail.com",
"first_name": "John",
"gender": "male",
"id": "143fad2b-fe21-4cbf-85a1-0ab55c37845d",
"last_name": "Doe",
"middle_name": "McDonald",
"profile_pic": null,
"updated_at": "2019-09-16T05:58:51.801Z",
"username": "john_doe"
},
"token": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjE0M2ZhZDJiLWZlMjEtNGNiZi04NWExLTBhYjU1YzM3ODQ1ZCIsInVzZXJuYW1lIjoicnl0byIsImVtYWlsIjoicnl0b0BnbWFpbC5jb20iLCJmaXJzdF9uYW1lIjoiUnl0byIsIm1pZGRsZV9uYW1lIjoiIiwibGFzdF9uYW1lIjoiVmVya2FyIiwiYmlvIjoiTGFib3Jpb3NhbSBuZXF1ZSBhdXQuIFF1aWJ1c2RhbSB2b2x1cHRhdGVtIHJlcnVtLiBRdW9kIG9wdGlvIGlwc3VtLiIsImJpcnRoZGF5IjoiMTk3MS0wNC0yNiIsImdlbmRlciI6Im1hbGUiLCJleHAiOjE1Njg3MTEyNjV9.xTwXEtpnm1g8US0Y8N6MMHxBtLXbwkU_GHDiwNCVBIE"}