{"info":{"_postman_id":"f9aef980-070f-4389-96be-8eee91d3da29","name":"Todo-Jwt-Cookie","description":"<html><head></head><body><h2 id=\"todo-api-collection\">Todo api collection</h2>\n<p>The colletion contains sample request and response from this <a href=\"https://todo-jwt-cookie-app.herokuapp.com\">API</a></p>\n<p>It contains the following request </p>\n<ul>\n<li>POST  /login </li>\n<li>POST /signup</li>\n<li>GET /todos</li>\n<li>POST /todos</li>\n<li>PUT /todos/:id</li>\n<li>DELETE /todos/:id</li>\n<li>GET /todos/:id</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"17412794","collectionId":"f9aef980-070f-4389-96be-8eee91d3da29","publishedId":"UV5UjJjD","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-10-14T08:13:06.000Z"},"item":[{"name":"Register User","id":"a083932f-c40c-4ac7-92a2-bfc46590d104","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"shimanshu\",\r\n    \"email\":\"shimanshuyadav83@gmail.com\",\r\n    \"password\":\"s12345678\",\r\n    \"confirmPassword\":\"s12345678\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://todo-jwt-cookie-app.herokuapp.com/signup","description":"<h1 id=\"register-user\">Register User</h1>\n<p>The <a href=\"https://todo-jwt-cookie-app.herokuapp.com/signup\">https://todo-jwt-cookie-app.herokuapp.com/signup</a> need this json body </p>\n<p><code>{     \"username\":\"shimanshu\",     \"email\":\"shimanshuyadav83@gmail.com\",     \"password\":\"s12345678\",     \"confirmPassword\":\"s12345678\" }</code></p>\n<p>here email must be unique.</p>\n","urlObject":{"protocol":"https","path":["signup"],"host":["todo-jwt-cookie-app","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"b1fbf797-4003-40ce-bc45-b7e5b38d1262","name":"Register User","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"shimanshu\",\r\n    \"email\":\"shimanshuyadav83@gmail.com\",\r\n    \"password\":\"s12345678\",\r\n    \"confirmPassword\":\"s12345678\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://todo-jwt-cookie-app.herokuapp.com/signup"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"152"},{"key":"Etag","value":"W/\"98-9juCDTego0Va2uErAUZjqJ8ORWw\""},{"key":"Date","value":"Thu, 14 Oct 2021 07:26:41 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"sucess\": true,\n    \"msg\": \"User successfully registerd\",\n    \"user\": {\n        \"id\": \"6167dbb1cee5ab4021b0d600\",\n        \"email\": \"shimanshuyadav83@gmail.com\",\n        \"username\": \"shimanshu\"\n    }\n}"}],"_postman_id":"a083932f-c40c-4ac7-92a2-bfc46590d104"},{"name":"Login User","id":"08a87712-e5ef-4d9d-8c68-1295a657dd8a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"shimanshuyadav83@gmail.com\",\r\n    \"password\":\"s12345678\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://todo-jwt-cookie-app.herokuapp.com/login","description":"<h2 id=\"login-user\">Login User</h2>\n<ul>\n<li>Checks wether you are registerd.</li>\n<li>It will create the jwt token and set the token in cookie</li>\n</ul>\n","urlObject":{"protocol":"https","path":["login"],"host":["todo-jwt-cookie-app","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"4aeb24e7-8725-4d21-af0d-2ea6add921d9","name":"Login User","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"shimanshuyadav83@gmail.com\",\r\n    \"password\":\"s12345678\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://todo-jwt-cookie-app.herokuapp.com/login"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MTY3ZGJiMWNlZTVhYjQwMjFiMGQ2MDAiLCJpYXQiOjE2MzQxOTY3MzAsImV4cCI6MTczNDE5NjczMH0.6OHZYg8Zc5QFJnfzU92X-ejYUixfJlnDydJaENIP7X0; Max-Age=900000; Path=/; Expires=Sun, 24 Oct 2021 17:32:10 GMT; HttpOnly"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"33"},{"key":"Etag","value":"W/\"21-HMq+3Ihb8NFGaDsAjBsXimx/SLA\""},{"key":"Date","value":"Thu, 14 Oct 2021 07:32:10 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"sucess\": true,\n    \"msg\": \"logged in\"\n}"}],"_postman_id":"08a87712-e5ef-4d9d-8c68-1295a657dd8a"},{"name":"Create Todo","id":"432c5937-b3e7-4625-9a11-a84525ffecfa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"task\" : \"creating resume\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://todo-jwt-cookie-app.herokuapp.com/todos","description":"<h3 id=\"create-a-todo\">Create a todo</h3>\n","urlObject":{"protocol":"https","path":["todos"],"host":["todo-jwt-cookie-app","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"c61e6596-a066-49bd-bbc1-f9ff9fe30aba","name":"Create Todo","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"task\" : \"creating resume\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://todo-jwt-cookie-app.herokuapp.com/todos"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"119"},{"key":"Etag","value":"W/\"77-/+VuLnZlE4zJkSFjxnPRYLkmN4Y\""},{"key":"Date","value":"Thu, 14 Oct 2021 07:54:27 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"sucess\": true,\n    \"msg\": \"created the task successfully\",\n    \"task\": {\n        \"id\": \"6167e233cee5ab4021b0d608\",\n        \"task\": \"creating resume\"\n    }\n}"}],"_postman_id":"432c5937-b3e7-4625-9a11-a84525ffecfa"},{"name":"Get all todos","id":"5baa5e83-1e16-4e11-919c-868922d6fe1f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Get all the todo(task) created by the user</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"42652671-d7c3-4bb2-9235-2c0ab99bbd3e","name":"Get all todos","originalRequest":{"method":"GET","header":[],"url":"https://todo-jwt-cookie-app.herokuapp.com/todos"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"188"},{"key":"Etag","value":"W/\"bc-x+GcEkiyA6+L6gWBhmdfSVxSJEw\""},{"key":"Date","value":"Thu, 14 Oct 2021 07:56:08 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": \"6167e20bcee5ab4021b0d604\",\n        \"task\": \"wrinting documentation\"\n    },\n    {\n        \"id\": \"6167e223cee5ab4021b0d606\",\n        \"task\": \"deploying node app\"\n    },\n    {\n        \"id\": \"6167e233cee5ab4021b0d608\",\n        \"task\": \"creating resume\"\n    }\n]"}],"_postman_id":"5baa5e83-1e16-4e11-919c-868922d6fe1f"},{"name":"Update Todo","id":"cfeee550-d9fe-4e0c-aca9-3270b02d86d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"task\" : \"task is updated\"\r\n}"},"url":"https://todo-jwt-cookie-app.herokuapp.com/todos/6167e20bcee5ab4021b0d604","description":"<h3 id=\"update-an-existing-todo\">Update an existing todo</h3>\n","urlObject":{"protocol":"https","path":["todos","6167e20bcee5ab4021b0d604"],"host":["todo-jwt-cookie-app","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"1cfca6de-d4be-4726-ac1c-35a3ee135e8d","name":"Update Todo","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"task\" : \"task is updated\"\r\n}"},"url":"https://todo-jwt-cookie-app.herokuapp.com/todos/6167e20bcee5ab4021b0d604"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"104"},{"key":"Etag","value":"W/\"68-0VYdFaC6wWvXYDlWzLQO46bcVUI\""},{"key":"Date","value":"Thu, 14 Oct 2021 08:01:19 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"sucess\": true,\n    \"msg\": \"successfully updated\",\n    \"data\": {\n        \"id\": \"6167d0320194586552621c4a\",\n        \"task\": \"next task\"\n    }\n}"}],"_postman_id":"cfeee550-d9fe-4e0c-aca9-3270b02d86d9"},{"name":"Delete Todo","id":"1766e1f5-fead-457c-8bd7-92fc482037ee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://todo-jwt-cookie-app.herokuapp.com/todos/6167e20bcee5ab4021b0d604","description":"<h3 id=\"delete-and-existing-todo\">Delete and existing todo</h3>\n","urlObject":{"protocol":"https","path":["todos","6167e20bcee5ab4021b0d604"],"host":["todo-jwt-cookie-app","herokuapp","com"],"query":[],"variable":[]}},"response":[{"id":"319ba334-6a03-4198-92dd-fb5a23d48263","name":"Delete Todo","originalRequest":{"method":"DELETE","header":[],"url":"https://todo-jwt-cookie-app.herokuapp.com/todos/6167e20bcee5ab4021b0d604"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"44"},{"key":"Etag","value":"W/\"2c-UzTF7ayF1A7Z9+GSTY0yL5HA3/o\""},{"key":"Date","value":"Thu, 14 Oct 2021 08:04:41 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"sucess\": true,\n    \"msg\": \"successfully deleted\"\n}"}],"_postman_id":"1766e1f5-fead-457c-8bd7-92fc482037ee"},{"name":"Single Todo","id":"8ea4a319-3882-486c-ad9b-957efd0ca905","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h3 id=\"get-single-todo\">Get Single Todo</h3>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"a846ab13-b95f-45fc-a6ec-fbea25675b73","name":"Single Todo","originalRequest":{"method":"GET","header":[],"url":"https://todo-jwt-cookie-app.herokuapp.com/todos/6167e223cee5ab4021b0d606"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"Cowboy"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"61"},{"key":"Etag","value":"W/\"3d-lXIXPpIY3k62YPQvld+3ordj1pQ\""},{"key":"Date","value":"Thu, 14 Oct 2021 08:07:13 GMT"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"6167e223cee5ab4021b0d606\",\n    \"task\": \"deploying node app\"\n}"}],"_postman_id":"8ea4a319-3882-486c-ad9b-957efd0ca905"},{"name":"New Request","id":"0b9967de-574d-4e5f-b461-36f7a753f7c0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"0b9967de-574d-4e5f-b461-36f7a753f7c0"}]}