I’m working on an airtable automation that is putting in an address validation request to the USPS API. For some reason, when I try to fetch it times out. I’ve validated that the URL I’m testing on works just fine and provides a response, but no matter what I try, I cannot get this to work.
AFAIK, using Fetch is the only way I can access the XML response in airtable automations. I’m open to anything that gets me the data (I know that because it’s an XML response I can’t parse it immediately.)
Here’s an example of a URL (with my ID marked out) that is failing:
let geo2 = await fetch( 'http://secure.shippingapis.com/ShippingAPI.dll?API=Verify&XML=<AddressValidateRequest%20USERID="00000000"><Address><Address1>null</Address1><Address2>7400%20Quebec Pl NW</Address2><City>Brooklyn</City><State>NY</State><Zip5>20202</Zip5><Zip4></Zip4></Address></AddressValidateRequest>').then(response => response.text())
I can’t find any similar errors online, and have found code in other places (not airtable) that has worked. Any idea why this isn’t working, and if there are alternatives that work in airtable? I can’t use XMLhttpRequest as far as I can tell.