Error calling the service using reqwest

Hi I am getting error connecting to the service.

reqwest::Error { kind: Request, url: Url { scheme: "http", host: Some(Domain("")), port: Some(8008), path: "/xml_request.xml", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("dns error", Custom { kind: Other, error: "failed to lookup address information: nodename nor servname provided, or not known" })) }

This is on mac. If I use the curl request from mac it works. After looking up on internet I added in my /private/etc/hosts file restarted the mac. But didn't work.
Here is the code for review Ubuntu Pastebin
Thanks for the help.

Have you tried running dscacheutil -q host -a name from your macOS command line?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.