In my C# service for using the Tracking API I get what looks like escape characters in my response from ShipEngine.
My code:
var client = new RestClient("https://api.shipengine.com/v1/tracking");
client.DefaultTimeout = Timeout.InfiniteTimeSpan;
var request = new RestRequest("?carrier_code=ups&tracking_number={ ** Some Tracking Number **}", Method.Get);
request.AddHeader("Host", "api.shipengine.com");
request.AddHeader("API-Key", "{** TEST_API_KEY **}");
RestResponse response = client.ExecuteGet(request);
My result returns accurate data, but it appears to be formatted awkwardly:
I can deserialize into a dynamic object, but this seems off. Is it using my .NET environment and somehow replacing the carriage returns and new lines with their respective characters?
In my C# service for using the Tracking API I get what looks like escape characters in my response from ShipEngine.
My code:
My result returns accurate data, but it appears to be formatted awkwardly:
"{\r\n \"tracking_number\": \"1Z.......\",\r\n \"tracking_url\": \"http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&AgreeToTermsAndConditions=yes&loc=en_US&tracknum=1Z.......\",\r\n \"status_code\": \"DE\",\r\n \"carrier_code\": \"ups\",\r\n \"carrier_id\": 3,\r\n \"carrier_detail_code\": \"FS\",\r\n \"status_description\": \"Delivered\",\r\n \"carrier_status_code\": \"D\",\r\n \"carrier_status_description\": \"Delivered\",\r\n \"ship_date\": \"2024-04-12T07:00:00Z\",\r\n \"estimated_delivery_date\": null,\r\n
I can deserialize into a dynamic object, but this seems off. Is it using my .NET environment and somehow replacing the carriage returns and new lines with their respective characters?