Automation: call rest and include response in message

When a phone call comes in on my landline, I send a message containing the caller’s number to my mobile (using action: notify.pushover).
I’d also like to look up the location based on the area code and send that information too.

I already have a simple REST service for this: http://test:5010/codeToArea/getArea?number=00493023125111
I can call it using basic auth and it returns the location as plain text.

How can I call the REST API in my automation and use the result for sending?
How do I set this up with Home Assistant? Any suggestions?