I'm trying to mimic the POST request that happens at Fedex.com when they're loading tracking information for a package.
The URL that the request posts to is https://www.fedex.com/trackingCal/track
and the data that it sends in the request to get the full JSON is
#{"TrackPackagesRequest":{"appType":"wtrk","uniqueKey":"","processingParameters":{"anonymousTransaction":true,"clientId":"WTRK","returnDetailedErrors":true,"returnLocalizedDateTime":false},"trackingInfoList":[{"trackNumberInfo":{"trackingNumber":"61297641750622453544","trackingQualifier":"","trackingCarrier":""}}]}}
My goal is in my Rails app to feed a tracking number into this post request and mimic what the site is doing, hitting the endpoint and getting back the JSON or XML response to parse and use in my app.
I'm unclear as to how to do this and the efforts I've made thus far with net/http
and open-uri
haven't worked.
Any help here would be much appreciated