{ "info": { "_postman_id": "e1b31cb0-8720-4149-a1b9-bb8d1dbf744b", "name": "node-red-http-examples", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "trivial HTTP Server", "item": [ { "name": "send Request", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/trivial-http-server", "host": [ "{{BaseURL}}" ], "path": [ "trivial-http-server" ] } }, "response": [] } ] }, { "name": "show Request on Console", "item": [ { "name": "get /show-request", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/show-request", "host": [ "{{BaseURL}}" ], "path": [ "show-request" ] } }, "response": [] }, { "name": "post /show-request", "request": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "text", "value": "text-field", "type": "text" }, { "key": "file", "type": "file", "src": "./dummy-for-file-upload.txt" } ] }, "url": { "raw": "{{BaseURL}}/show-request", "host": [ "{{BaseURL}}" ], "path": [ "show-request" ] } }, "response": [] }, { "name": "put /show-request", "request": { "method": "PUT", "header": [], "body": { "mode": "raw", "raw": "Hello, World!\n(a plain-text body)", "options": { "raw": { "language": "text" } } }, "url": { "raw": "{{BaseURL}}/show-request", "host": [ "{{BaseURL}}" ], "path": [ "show-request" ] } }, "response": [] }, { "name": "delete /show-request", "request": { "method": "DELETE", "header": [], "url": { "raw": "{{BaseURL}}/show-request", "host": [ "{{BaseURL}}" ], "path": [ "show-request" ] } }, "response": [] }, { "name": "patch /show-request", "request": { "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"boolean\":true,\n \"number\":3.14159265,\n \"string\":\"test\",\n \"array\":[true,3.14159265,\"test\",[],{}],\n \"object\":{\n \"boolean\":true,\n \"number\":3.14159265,\n \"string\":\"test\",\n \"inner-array\":[],\n \"inner-object\":{}\n },\n \"null\":null\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{BaseURL}}/show-request", "host": [ "{{BaseURL}}" ], "path": [ "show-request" ] } }, "response": [] } ] }, { "name": "Routing with Placeholders", "item": [ { "name": "simple \"any\"", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/routing/any", "host": [ "{{BaseURL}}" ], "path": [ "routing", "any" ] } }, "response": [] }, { "name": "\"any\" with a simple value", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/routing/any/simple-value", "host": [ "{{BaseURL}}" ], "path": [ "routing", "any", "simple-value" ] } }, "response": [] }, { "name": "a path for \"any\"", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/routing/any/with/a/complete/path", "host": [ "{{BaseURL}}" ], "path": [ "routing", "any", "with", "a", "complete", "path" ] } }, "response": [] }, { "name": "\"inner\"", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/routing/inner/suffix", "host": [ "{{BaseURL}}" ], "path": [ "routing", "inner", "suffix" ] } }, "response": [] }, { "name": "\"first\" and \"second\"", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/routing/first/and/second", "host": [ "{{BaseURL}}" ], "path": [ "routing", "first", "and", "second" ] } }, "response": [] } ] }, { "name": "Query Handling", "item": [ { "name": "query", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "method": "GET", "header": [], "body": { "mode": "formdata", "formdata": [] }, "url": { "raw": "{{BaseURL}}/query?single=single value with inner spaces&multiple=first value of a series&multiple=second value of a series&empty", "host": [ "{{BaseURL}}" ], "path": [ "query" ], "query": [ { "key": "single", "value": "single value with inner spaces" }, { "key": "multiple", "value": "first value of a series" }, { "key": "multiple", "value": "second value of a series" }, { "key": "empty", "value": null } ] } }, "response": [] } ] }, { "name": "Form Processing", "item": [ { "name": "submit form", "request": { "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "boolean", "value": "true", "type": "text" }, { "key": "number", "value": "3.14159265", "type": "text" }, { "key": "string", "value": "Test", "type": "text" }, { "key": "hidden", "value": "hidden value", "type": "text" } ] }, "url": { "raw": "{{BaseURL}}/form-processing", "host": [ "{{BaseURL}}" ], "path": [ "form-processing" ] } }, "response": [] } ] }, { "name": "File Uploads", "item": [ { "name": "upload file", "request": { "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "file", "contentType": "text/plain", "type": "file", "src": "./examples/file-upload.txt" } ] }, "url": { "raw": "{{BaseURL}}/file-upload", "host": [ "{{BaseURL}}" ], "path": [ "file-upload" ] } }, "response": [] } ] }, { "name": "HTTP Status Codes", "item": [ { "name": "I'm a teapot", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/status-code/418", "host": [ "{{BaseURL}}" ], "path": [ "status-code", "418" ] } }, "response": [] }, { "name": "unknown status code", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/status-code/499", "host": [ "{{BaseURL}}" ], "path": [ "status-code", "499" ] } }, "response": [] } ] }, { "name": "Header Handling", "item": [ { "name": "send and receive with extra header", "request": { "method": "GET", "header": [ { "key": "custom-header", "value": "custom request header value", "type": "text" } ], "url": { "raw": "{{BaseURL}}/header-handling", "host": [ "{{BaseURL}}" ], "path": [ "header-handling" ] } }, "response": [] } ] }, { "name": "different Data Types", "item": [ { "name": "plain text", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/data-of-type-text-plain", "host": [ "{{BaseURL}}" ], "path": [ "data-of-type-text-plain" ] } }, "response": [] }, { "name": "JSON", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/data-of-type-application-json", "host": [ "{{BaseURL}}" ], "path": [ "data-of-type-application-json" ] } }, "response": [] }, { "name": "PNG image", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/data-of-type-image-png", "host": [ "{{BaseURL}}" ], "path": [ "data-of-type-image-png" ] } }, "response": [] } ] }, { "name": "Error Handling", "item": [ { "name": "foreseen Error", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/foreseen-error", "host": [ "{{BaseURL}}" ], "path": [ "foreseen-error" ] } }, "response": [] }, { "name": "unforeseen Error", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/unforeseen-error", "host": [ "{{BaseURL}}" ], "path": [ "unforeseen-error" ] } }, "response": [] } ] }, { "name": "Virtual Hosts", "item": [ { "name": "retrieve virtual host", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/virtual-host", "host": [ "{{BaseURL}}" ], "path": [ "virtual-host" ] } }, "response": [] } ] }, { "name": "multiple HTTP Endpoints", "item": [ { "name": "get specific-file", "request": { "method": "GET", "header": [], "url": { "raw": "{{BaseURL}}/Clash/specific-file", "host": [ "{{BaseURL}}" ], "path": [ "Clash", "specific-file" ] } }, "response": [] } ] } ], "auth": { "type": "basic", "basic": [ { "key": "password", "value": "{{Password}}", "type": "string" }, { "key": "username", "value": "{{Username}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "BaseURL", "value": "127.0.0.1:1880" }, { "key": "Username", "value": "" }, { "key": "Password", "value": "" } ] }