Lookup hostname using DNS in HubAction

I have the following code:

def result = new physicalgraph.device.HubAction(
method: ‘GET’,
path: “/api/alarm/${url}”,
headers: [
HOST: “${settings.ip}:${settings.port}”
]
)
sendHubCommand(result)

How could I pass a hostname to HubAction? Or is there a way to resolve a hostname to an IP address and pass it? I saw some posts about using dns.google.com but I need to resolve a hostname on my LAN.