Skip to content

Postman

Brett edited this page Nov 9, 2022 · 1 revision
{
	"info": {
		"_postman_id": "51670d02-7f47-4d35-918b-4806d950cd30",
		"name": "Ruby on Rails User Offers",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Signup Invalid",
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "default"
					},
					{
						"key": "Origin",
						"value": "http://www.google.com",
						"type": "default",
						"disabled": true
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n    \"user\": {\r\n        \"email\": null,\r\n        \"password\": null,\r\n        \"first_name\": null,\r\n        \"last_name\": null,\r\n        \"birthdate\": null,\r\n        \"gender\": null\r\n    }\r\n}"
				},
				"url": {
					"raw": "http://localhost:30001/signup",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "30001",
					"path": [
						"signup"
					]
				}
			},
			"response": []
		},
		{
			"name": "Signup Valid",
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "default"
					},
					{
						"key": "Origin",
						"value": "http://www.google.com",
						"type": "default",
						"disabled": true
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n    \"user\": {\r\n        \"email\": \"email3@example.com\",\r\n        \"password\": \"password\",\r\n        \"first_name\": \"first\",\r\n        \"last_name\": \"last\",\r\n        \"birthdate\": \"2010-01-01\",\r\n        \"gender\": 1\r\n    }\r\n}"
				},
				"url": {
					"raw": "http://localhost:30001/signup",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "30001",
					"path": [
						"signup"
					]
				}
			},
			"response": []
		},
		{
			"name": "Login",
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "default"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\r\n    \"user\": {\r\n        \"email\": \"email2@example.com\",\r\n        \"password\": \"password\"\r\n    }\r\n}"
				},
				"url": {
					"raw": "http://localhost:30001/login",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "30001",
					"path": [
						"login"
					]
				}
			},
			"response": []
		},
		{
			"name": "Logout",
			"request": {
				"method": "DELETE",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "default"
					}
				],
				"url": {
					"raw": "http://localhost:30001/logout",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "30001",
					"path": [
						"logout"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get Offers",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Content-Type",
						"value": "application/json",
						"type": "default"
					}
				],
				"url": {
					"raw": "http://localhost:30001/offers/index",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "30001",
					"path": [
						"offers",
						"index"
					]
				}
			},
			"response": []
		}
	],
	"auth": {
		"type": "bearer",
		"bearer": [
			{
				"key": "token",
				"value": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI0YjY1ZWY3Mi03NzZjLTRkYzItM2E1OC1mZjkyNDcwM2YyMjEiLCJzdWIiOiIyIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNjY2NjAyOTgxLCJleHAiOjE2NjY2MDQ3ODF9.P-JD3Z6TjiNPZbFJiF-5emOsI9TpWBQHNr-4ZJtjELo",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	]
}

Clone this wiki locally