Access REST API to retrieve a JSON Web Token (JWT)

Hi Everyone, I am new to Node-RED and not sure how to proceed.

I need to access a REST API to retrieve a JSON Web Token (JWT)

I can do this with the following curl command:

curl -X POST https://servername:1925/myapp/login -H 'content-type: application/vnd.myapp+json;version=1.0' -d '{ "userName":"myusername", "password":"mypassword"}'

I'm guessing I could use an http-request node but not sure how I would configure it or how I would store the JWT for use on the next request to my applications REST API.

The http request headers link in the cookbook should help you start to do this
https://cookbook.nodered.org