Try this...
[{"id":"606e0c6c93bc3b1a","type":"inject","z":"c876e57260edd2ab","name":"Click me","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":640,"y":780,"wires":[["4a881416445ff3e7"]]},{"id":"4a881416445ff3e7","type":"function","z":"c876e57260edd2ab","name":"","func":"//original curl: \n//\n//curl -i --header 'Referer: http://localhost:8080' --data 'username=admin&password=adminadmin' http://localhost:8080/api/v2/auth/login\n\nmsg.method = \"post\";\nmsg.url = \"http://localhost:8080/api/v2/auth/login\";\nmsg.payload = `username=admin&password=adminadmin`;\nmsg.headers = {\n \"Referer\": \"http://localhost:8080\",\n \"Content-Type\": \"application/x-www-form-urlencoded\"\n};\nmsg.cookies = null;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":820,"y":780,"wires":[["3695a2656792ac3a"]]},{"id":"3695a2656792ac3a","type":"http request","z":"c876e57260edd2ab","name":"","method":"use","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":1000,"y":780,"wires":[["2e35023de976776e"]]},{"id":"2e35023de976776e","type":"debug","z":"c876e57260edd2ab","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1180,"y":780,"wires":[]},{"id":"63543d5f2f46c634","type":"comment","z":"c876e57260edd2ab","name":"Edit this function ↓ and set username/password","info":"","x":860,"y":740,"wires":[]}]
Copy the above flow JSON and import it into node-red using CTRL-I
Set the url/username/password up in the function node before operating.