[
    {
        "id": "051ffea40d43c3e1",
        "type": "tab",
        "label": "HTTP Nodes",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "6f4a11bc234804cb",
        "type": "group",
        "z": "051ffea40d43c3e1",
        "name": "Setting HTTP Request Headers",
        "style": {
            "fill": "#6f2fa0",
            "fill-opacity": "0.5",
            "label": true,
            "label-position": "n",
            "color": "#ffffff"
        },
        "nodes": [
            "1ccc20e.71730df",
            "bc626348.1496d",
            "b13b7c19.79cbd",
            "7fe0fee5.f3ed7",
            "65b13d57.700074",
            "757fe655.e28558",
            "5195095.03b4cf8",
            "70b37501f4a9cc70",
            "bc851193bd1afa8d",
            "361182997107c6a1",
            "3a62f641.2c0e8a"
        ],
        "x": 74,
        "y": 859,
        "w": 832,
        "h": 242
    },
    {
        "id": "22595b8d4887ce45",
        "type": "group",
        "z": "051ffea40d43c3e1",
        "name": "Fetching Resource Headers",
        "style": {
            "fill": "#6f2fa0",
            "fill-opacity": "0.5",
            "label": true,
            "label-position": "n",
            "color": "#ffffff"
        },
        "nodes": [
            "51337dd86b668fa2",
            "4899b1f81251b647",
            "1ec5414151c6f506",
            "8038e2d1c2371237",
            "8c9754938f90591b"
        ],
        "x": 74,
        "y": 1139,
        "w": 892,
        "h": 122
    },
    {
        "id": "27997877312bd0cc",
        "type": "group",
        "z": "051ffea40d43c3e1",
        "name": "Hello qibb",
        "style": {
            "fill": "#6f2fa0",
            "fill-opacity": "0.5",
            "label": true,
            "label-position": "n",
            "color": "#ffffff"
        },
        "nodes": [
            "a10ce571.7f22a",
            "d96d5963.238aa",
            "88bd114b0ce8c426",
            "5a89ce70.db6d5",
            "31f7aabb.3fbe06",
            "18b48ed8.1072e1",
            "3c61c12c.5abaae",
            "a65364a3.c72a58",
            "44863581eb9b9faf"
        ],
        "x": 74,
        "y": 59,
        "w": 772,
        "h": 242
    },
    {
        "id": "e3202a9ae5601425",
        "type": "group",
        "z": "051ffea40d43c3e1",
        "name": "Handling Query Parameters",
        "style": {
            "fill": "#6f2fa0",
            "fill-opacity": "0.5",
            "label": true,
            "label-position": "n",
            "color": "#ffffff"
        },
        "nodes": [
            "bd84366daf8577d8",
            "91f1c77df302355e",
            "7d76840049b6aa78",
            "c9978cc284d87c7f",
            "7fee6dd28f4e992c",
            "6c93e558583adbc7",
            "2817d7129facc3ac",
            "47fc546813c23538"
        ],
        "x": 74,
        "y": 339,
        "w": 652,
        "h": 222
    },
    {
        "id": "51e0c48eb58874a8",
        "type": "group",
        "z": "051ffea40d43c3e1",
        "name": "Handling Path Parameters",
        "style": {
            "fill": "#6f2fa0",
            "fill-opacity": "0.5",
            "label": true,
            "label-position": "n",
            "color": "#ffffff"
        },
        "nodes": [
            "38a97c9f630643dd",
            "e365b7ba2b296480",
            "5869c9ccc17d1c97",
            "435b16ac5afc4f62",
            "09b230a2d24bc511",
            "bcaa96aea3b43b99",
            "228ee475793f843b",
            "863cbb952a3f5014"
        ],
        "x": 74,
        "y": 599,
        "w": 632,
        "h": 222
    },
    {
        "id": "6b9c46f0ee6db05d",
        "type": "swagger-doc",
        "summary": "Returns a \"Hello from qibb!\" HTML page",
        "description": "This API endpoint serves an HTML page with \"Hello from qibb!\" greeting.",
        "tags": "greetings",
        "consumes": "",
        "produces": "text/plain",
        "parameters": [],
        "responses": {
            "200": {
                "description": "OK"
            }
        },
        "security0": "",
        "securityScopes0": "",
        "deprecated": false
    },
    {
        "id": "f2073d3e27886709",
        "type": "swagger-doc",
        "summary": "Returns a JSON file with information about the HTTP request headers",
        "description": "Returns a JSON file containing the status message, the user-agent and the X-API-Key.",
        "tags": "greetings",
        "consumes": "",
        "produces": "application/json",
        "parameters": [
            {
                "name": "user-agent",
                "in": "header",
                "description": "Client's user agent",
                "required": false,
                "type": "string"
            }
        ],
        "responses": {
            "200": {
                "description": "OK"
            },
            "401": {
                "description": "Unauthorized"
            }
        },
        "security0": "8bfef498f687e670",
        "securityScopes0": "",
        "deprecated": false
    },
    {
        "id": "041405544e4217b7",
        "type": "swagger-doc",
        "summary": "Generates a dynamic HTML greeting page by utilizing query parameters",
        "description": "This dynamic API endpoint generates a personalized HTML page that greets the user, by replacing the provided 'firstName' and 'secondName' query parameters.",
        "tags": "greetings",
        "consumes": "",
        "produces": "text/plain",
        "parameters": [
            {
                "name": "firstName",
                "in": "query",
                "description": "User's first name",
                "required": true,
                "type": "string"
            },
            {
                "name": "lastName",
                "in": "query",
                "description": "User's last name",
                "required": true,
                "type": "string"
            }
        ],
        "responses": {
            "200": {
                "description": "OK"
            }
        },
        "security0": "",
        "securityScopes0": "",
        "deprecated": false
    },
    {
        "id": "f5b0a068b759abb3",
        "type": "swagger-doc",
        "summary": "generates a dynamic HTML greeting page by utilizing path paremeter",
        "description": "This dynamic API endpoint generates a personalized HTML page that greets the user, using the provided 'name' path parameter provided.",
        "tags": "greetings",
        "consumes": "",
        "produces": "text/plain",
        "parameters": [
            {
                "name": "name",
                "in": "path",
                "description": "Name of the user",
                "required": true,
                "type": "string"
            }
        ],
        "responses": {
            "200": {
                "description": "OK"
            }
        },
        "security0": "",
        "securityScopes0": "",
        "deprecated": false
    },
    {
        "id": "8bfef498f687e670",
        "type": "openapi-generator-security-scheme",
        "definitionName": "basic",
        "securityType": "basic",
        "description": "Basic Authentication",
        "name": "",
        "in": "",
        "flow": "",
        "authorizationUrl": "",
        "tokenUrl": "",
        "scopes": ""
    },
    {
        "id": "a10ce571.7f22a",
        "type": "http in",
        "z": "051ffea40d43c3e1",
        "g": "27997877312bd0cc",
        "name": "GET /hello",
        "url": "/hello",
        "method": "get",
        "upload": false,
        "swaggerDoc": "6b9c46f0ee6db05d",
        "x": 160,
        "y": 160,
        "wires": [
            [
                "88bd114b0ce8c426"
            ]
        ]
    },
    {
        "id": "d96d5963.238aa",
        "type": "http response",
        "z": "051ffea40d43c3e1",
        "g": "27997877312bd0cc",
        "name": "",
        "statusCode": "",
        "headers": {},
        "x": 590,
        "y": 160,
        "wires": []
    },
    {
        "id": "88bd114b0ce8c426",
        "type": "template",
        "z": "051ffea40d43c3e1",
        "g": "27997877312bd0cc",
        "name": "HTML ",
        "field": "payload",
        "fieldType": "msg",
        "format": "html",
        "syntax": "mustache",
        "template": "<!DOCTYPE html>\n<html>\n<head>\n    <title>qibb HTTP Nodes</title>\n</head>\n<body>\n    <h1>Hello from qibb!</h1>\n</body>\n</html>\n",
        "output": "str",
        "x": 370,
        "y": 160,
        "wires": [
            [
                "d96d5963.238aa"
            ]
        ]
    },
    {
        "id": "5a89ce70.db6d5",
        "type": "http request",
        "z": "051ffea40d43c3e1",
        "g": "27997877312bd0cc",
        "name": "GET /hello",
        "method": "GET",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 390,
        "y": 260,
        "wires": [
            [
                "18b48ed8.1072e1"
            ]
        ]
    },
    {
        "id": "31f7aabb.3fbe06",
        "type": "inject",
        "z": "051ffea40d43c3e1",
        "g": "27997877312bd0cc",
        "name": "",
        "props": [
            {
                "p": "url",
                "v": "$env(\"BASE_URL\") & \"/hello\"",
                "vt": "jsonata"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 170,
        "y": 260,
        "wires": [
            [
                "5a89ce70.db6d5"
            ]
        ]
    },
    {
        "id": "18b48ed8.1072e1",
        "type": "debug",
        "z": "051ffea40d43c3e1",
        "g": "27997877312bd0cc",
        "name": "Hello qibb",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 600,
        "y": 260,
        "wires": []
    },
    {
        "id": "3c61c12c.5abaae",
        "type": "comment",
        "z": "051ffea40d43c3e1",
        "g": "27997877312bd0cc",
        "name": "Send HTTP GET Request: https://{BaseURL}/hello",
        "info": "`http request` node can be used to make an **HTTP GET** request.",
        "x": 280,
        "y": 220,
        "wires": []
    },
    {
        "id": "a65364a3.c72a58",
        "type": "comment",
        "z": "051ffea40d43c3e1",
        "g": "27997877312bd0cc",
        "name": "Set URL in HTTP request node setting panel",
        "info": "`http request` node can be used to make an **HTTP GET** request.",
        "x": 660,
        "y": 220,
        "wires": []
    },
    {
        "id": "44863581eb9b9faf",
        "type": "comment",
        "z": "051ffea40d43c3e1",
        "g": "27997877312bd0cc",
        "name": "Creating GET API Endpoint: https://{BaseURL}/hello",
        "info": "`HTTP In` node can be used to create an API endpoint.",
        "x": 290,
        "y": 100,
        "wires": []
    },
    {
        "id": "bd84366daf8577d8",
        "type": "http in",
        "z": "051ffea40d43c3e1",
        "g": "e3202a9ae5601425",
        "name": "GET /hello-query",
        "url": "/hello-query",
        "method": "get",
        "upload": false,
        "swaggerDoc": "041405544e4217b7",
        "x": 180,
        "y": 420,
        "wires": [
            [
                "91f1c77df302355e"
            ]
        ]
    },
    {
        "id": "91f1c77df302355e",
        "type": "template",
        "z": "051ffea40d43c3e1",
        "g": "e3202a9ae5601425",
        "name": "HTML",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "<html>\n    <head>\n        <title>qibb HTTP Nodes</title>\n    </head>\n    <body>\n        <h1>Hello {{req.query.firstName}} {{req.query.lastName}}!</h1>\n    </body>\n</html>",
        "output": "str",
        "x": 410,
        "y": 420,
        "wires": [
            [
                "7d76840049b6aa78"
            ]
        ]
    },
    {
        "id": "7d76840049b6aa78",
        "type": "http response",
        "z": "051ffea40d43c3e1",
        "g": "e3202a9ae5601425",
        "name": "",
        "statusCode": "",
        "headers": {},
        "x": 590,
        "y": 420,
        "wires": []
    },
    {
        "id": "c9978cc284d87c7f",
        "type": "inject",
        "z": "051ffea40d43c3e1",
        "g": "e3202a9ae5601425",
        "name": "",
        "props": [
            {
                "p": "url",
                "v": "$env(\"BASE_URL\") & \"/hello-query?firstName=John&lastName=Doe\"",
                "vt": "jsonata"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 170,
        "y": 520,
        "wires": [
            [
                "7fee6dd28f4e992c"
            ]
        ]
    },
    {
        "id": "7fee6dd28f4e992c",
        "type": "http request",
        "z": "051ffea40d43c3e1",
        "g": "e3202a9ae5601425",
        "name": "GET /hello-query",
        "method": "GET",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 350,
        "y": 520,
        "wires": [
            [
                "6c93e558583adbc7"
            ]
        ]
    },
    {
        "id": "6c93e558583adbc7",
        "type": "debug",
        "z": "051ffea40d43c3e1",
        "g": "e3202a9ae5601425",
        "name": "Query Parameters",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 590,
        "y": 520,
        "wires": []
    },
    {
        "id": "38a97c9f630643dd",
        "type": "http request",
        "z": "051ffea40d43c3e1",
        "g": "51e0c48eb58874a8",
        "name": "GET /hello-path/John",
        "method": "GET",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 360,
        "y": 780,
        "wires": [
            [
                "e365b7ba2b296480"
            ]
        ]
    },
    {
        "id": "e365b7ba2b296480",
        "type": "debug",
        "z": "051ffea40d43c3e1",
        "g": "51e0c48eb58874a8",
        "name": "Path Parameter",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 580,
        "y": 780,
        "wires": []
    },
    {
        "id": "5869c9ccc17d1c97",
        "type": "inject",
        "z": "051ffea40d43c3e1",
        "g": "51e0c48eb58874a8",
        "name": "",
        "props": [
            {
                "p": "url",
                "v": "$env(\"BASE_URL\") & \"/hello-path/John\"",
                "vt": "jsonata"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 170,
        "y": 780,
        "wires": [
            [
                "38a97c9f630643dd"
            ]
        ]
    },
    {
        "id": "2817d7129facc3ac",
        "type": "comment",
        "z": "051ffea40d43c3e1",
        "g": "e3202a9ae5601425",
        "name": "Handle query parameters passed to an HTTP endpoint",
        "info": "The `HTTP in` node can accept query parameters passwd to an HTTP endpoint.  It use the `msg.req.query` property of the message sent by the HTTP In node to access the parameters.",
        "x": 300,
        "y": 380,
        "wires": []
    },
    {
        "id": "435b16ac5afc4f62",
        "type": "http in",
        "z": "051ffea40d43c3e1",
        "g": "51e0c48eb58874a8",
        "name": "GET /hello-path/:name",
        "url": "/hello-path/:name",
        "method": "get",
        "upload": false,
        "swaggerDoc": "f5b0a068b759abb3",
        "x": 200,
        "y": 680,
        "wires": [
            [
                "bcaa96aea3b43b99"
            ]
        ]
    },
    {
        "id": "09b230a2d24bc511",
        "type": "comment",
        "z": "051ffea40d43c3e1",
        "g": "51e0c48eb58874a8",
        "name": "Handle URL path parameters in an HTTP endpoint",
        "info": "Named path parameters (e.g. `:name`) in the URL property can be used to identify parts of the path that can vary between requests.\n\nThe `msg.req.params` property is an object of key/value pairs for each path parameter.",
        "x": 280,
        "y": 640,
        "wires": []
    },
    {
        "id": "bcaa96aea3b43b99",
        "type": "template",
        "z": "051ffea40d43c3e1",
        "g": "51e0c48eb58874a8",
        "name": "HTML",
        "field": "payload",
        "fieldType": "msg",
        "format": "html",
        "syntax": "mustache",
        "template": "<html>\n\n<head>\n    <title>qibb HTTP Nodes</title>\n</head>\n\n<body>\n    <h1>Hello {{req.params.name}}!</h1>\n</body>\n\n</html>",
        "output": "str",
        "x": 410,
        "y": 680,
        "wires": [
            [
                "228ee475793f843b"
            ]
        ]
    },
    {
        "id": "228ee475793f843b",
        "type": "http response",
        "z": "051ffea40d43c3e1",
        "g": "51e0c48eb58874a8",
        "name": "",
        "statusCode": "",
        "headers": {},
        "x": 590,
        "y": 680,
        "wires": []
    },
    {
        "id": "47fc546813c23538",
        "type": "comment",
        "z": "051ffea40d43c3e1",
        "g": "e3202a9ae5601425",
        "name": "Send HTTP GET Request: https://{BaseURL}/hello-query?firstName=John&lastName=Doe",
        "info": "`http request` node can be used to make an **HTTP GET** request.",
        "x": 400,
        "y": 480,
        "wires": []
    },
    {
        "id": "863cbb952a3f5014",
        "type": "comment",
        "z": "051ffea40d43c3e1",
        "g": "51e0c48eb58874a8",
        "name": "Send HTTP GET Request: https://{BaseURL}/hello-path/John",
        "info": "`http request` node can be used to make an **HTTP GET** request.",
        "x": 320,
        "y": 740,
        "wires": []
    },
    {
        "id": "1ccc20e.71730df",
        "type": "http in",
        "z": "051ffea40d43c3e1",
        "g": "6f4a11bc234804cb",
        "name": "GET /hello-headers",
        "url": "/hello-headers",
        "method": "get",
        "upload": false,
        "swaggerDoc": "f2073d3e27886709",
        "x": 190,
        "y": 940,
        "wires": [
            [
                "70b37501f4a9cc70"
            ]
        ]
    },
    {
        "id": "bc626348.1496d",
        "type": "http response",
        "z": "051ffea40d43c3e1",
        "g": "6f4a11bc234804cb",
        "name": "",
        "statusCode": "",
        "headers": {},
        "x": 810,
        "y": 920,
        "wires": []
    },
    {
        "id": "b13b7c19.79cbd",
        "type": "comment",
        "z": "051ffea40d43c3e1",
        "g": "6f4a11bc234804cb",
        "name": "Access HTTP request headers",
        "info": " `msg.req.headers` property of the message sent by the `HTTP In` node to access the headers.\n\n",
        "x": 220,
        "y": 900,
        "wires": []
    },
    {
        "id": "7fe0fee5.f3ed7",
        "type": "http request",
        "z": "051ffea40d43c3e1",
        "g": "6f4a11bc234804cb",
        "name": "GET /hello-headers",
        "method": "GET",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "basic",
        "senderr": true,
        "headers": [
            {
                "keyType": "other",
                "keyValue": "X-API-Key",
                "valueType": "other",
                "valueValue": "b73432c0-5fdf-4967-8677-8a3d036c88a51"
            },
            {
                "keyType": "other",
                "keyValue": "user-agent",
                "valueType": "other",
                "valueValue": "qibb"
            }
        ],
        "x": 370,
        "y": 1060,
        "wires": [
            [
                "65b13d57.700074"
            ]
        ]
    },
    {
        "id": "65b13d57.700074",
        "type": "debug",
        "z": "051ffea40d43c3e1",
        "g": "6f4a11bc234804cb",
        "name": "/hello-headers Output",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 660,
        "y": 1060,
        "wires": []
    },
    {
        "id": "757fe655.e28558",
        "type": "inject",
        "z": "051ffea40d43c3e1",
        "g": "6f4a11bc234804cb",
        "name": "",
        "props": [
            {
                "p": "url",
                "v": "$env(\"BASE_URL\") & \"/hello-headers\"",
                "vt": "jsonata"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 190,
        "y": 1060,
        "wires": [
            [
                "7fe0fee5.f3ed7"
            ]
        ]
    },
    {
        "id": "5195095.03b4cf8",
        "type": "comment",
        "z": "051ffea40d43c3e1",
        "g": "6f4a11bc234804cb",
        "name": "Set HTTP request header & send HTTP GET request: http://{flowAppUrl}/hello-headers",
        "info": "The field value pairs of the request headers \nyou would like to include in the message sent to the `HTTP request` node can be specified by setting `msg.headers` field.",
        "x": 420,
        "y": 1020,
        "wires": []
    },
    {
        "id": "70b37501f4a9cc70",
        "type": "switch",
        "z": "051ffea40d43c3e1",
        "g": "6f4a11bc234804cb",
        "name": "Check API Key",
        "property": "req.headers.x-api-key",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "b73432c0-5fdf-4967-8677-8a3d036c88a5",
                "vt": "str"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 400,
        "y": 940,
        "wires": [
            [
                "3a62f641.2c0e8a"
            ],
            [
                "bc851193bd1afa8d"
            ]
        ]
    },
    {
        "id": "bc851193bd1afa8d",
        "type": "template",
        "z": "051ffea40d43c3e1",
        "g": "6f4a11bc234804cb",
        "name": "Error JSON",
        "field": "payload",
        "fieldType": "msg",
        "format": "json",
        "syntax": "mustache",
        "template": "{\n    \"status\": \"Error\",\n    \"description\": \"Please make sure that you have provided the correct API-Key in the HTTP request headers!\"\n}",
        "output": "json",
        "x": 630,
        "y": 960,
        "wires": [
            [
                "361182997107c6a1"
            ]
        ]
    },
    {
        "id": "361182997107c6a1",
        "type": "http response",
        "z": "051ffea40d43c3e1",
        "g": "6f4a11bc234804cb",
        "name": "",
        "statusCode": "401",
        "headers": {},
        "x": 820,
        "y": 960,
        "wires": []
    },
    {
        "id": "3a62f641.2c0e8a",
        "type": "template",
        "z": "051ffea40d43c3e1",
        "g": "6f4a11bc234804cb",
        "name": "Success JSON",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\n    \"status\": \"Success\",\n    \"headers\": {\n        \"user-agent\": \"{{req.headers.user-agent}}\",\n        \"x-api-key\": \"{{ req.headers.x-api-key }}\"\n    }\n}",
        "output": "json",
        "x": 640,
        "y": 920,
        "wires": [
            [
                "bc626348.1496d"
            ]
        ]
    },
    {
        "id": "51337dd86b668fa2",
        "type": "http request",
        "z": "051ffea40d43c3e1",
        "g": "22595b8d4887ce45",
        "name": "Fetch Resource Header",
        "method": "use",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "https://download.samplelib.com/mp4/sample-30s.mp4",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 360,
        "y": 1220,
        "wires": [
            [
                "8038e2d1c2371237"
            ]
        ]
    },
    {
        "id": "4899b1f81251b647",
        "type": "inject",
        "z": "051ffea40d43c3e1",
        "g": "22595b8d4887ce45",
        "name": "",
        "props": [
            {
                "p": "method",
                "v": "HEAD",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 170,
        "y": 1220,
        "wires": [
            [
                "51337dd86b668fa2"
            ]
        ]
    },
    {
        "id": "1ec5414151c6f506",
        "type": "debug",
        "z": "051ffea40d43c3e1",
        "g": "22595b8d4887ce45",
        "name": "Size & Type",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 850,
        "y": 1220,
        "wires": []
    },
    {
        "id": "8038e2d1c2371237",
        "type": "function",
        "z": "051ffea40d43c3e1",
        "g": "22595b8d4887ce45",
        "name": "Filesize and Filetype Retrieval",
        "func": "function formatBytes(bytes) {\n    // Converts bytes to KiB, MiB, GiB, etc.\n    if (!bytes) return '0 Bytes'\n\n    const k = 1024;\n    const decimals = 2;\n    const sizes = ['Bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'];\n\n    // Gets the size index\n    const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n    // Returns the filesize in the respective size \n    return `${parseFloat((bytes / Math.pow(k, i)).toFixed(decimals))} ${sizes[i]}`;\n}\n\n// Fetching the file size from the headers\nconst fileSizeInBytes = msg.headers[\"content-length\"];\nconst fileType = msg.headers[\"content-type\"];\nconst lastModified = msg.headers[\"last-modified\"];\n\nconst fileSize = formatBytes(fileSizeInBytes);\n\n// Assigning the payload to a JSON object containg the type of the file and the converted filesize\nmsg.payload = {\n    type: fileType,\n    size: fileSize,\n    modificationDate: lastModified\n};\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 620,
        "y": 1220,
        "wires": [
            [
                "1ec5414151c6f506"
            ]
        ]
    },
    {
        "id": "8c9754938f90591b",
        "type": "comment",
        "z": "051ffea40d43c3e1",
        "g": "22595b8d4887ce45",
        "name": "Head Request",
        "info": "Fetching the Headers of a video file in order to fetch its size and type",
        "x": 170,
        "y": 1180,
        "wires": []
    }
]