katherineamt
Posts: 1
Joined: Wed Nov 21, 2018 5:02 pm
Location: USA
Contact: Website

GpsGate REST API Pre-flight

Wed Nov 21, 2018 5:30 pm

I'am having this CORS pre-flight issue with following code

Code: Select all

var ax = axios.create({
   baseURL: "http://<REDACTED>/comGpsGate/api/v.1/applications",
   headers: {
       common: { Authorization: "wzKGSAkC8UU2<REDACTED>" }
   }
});
ax.get('/4/users/15/tracks?Date=2018-9-24');
FireFox Console

I'am having success using cURL, Postman.

Code: Select all

curl -i -X GET "http://<REDACTED>/comGpsGate/api/v.1/applications/4/users/15/tracks?Date=2018-9-24" -H "accept: application/json" -H "Authorization: wzKGSAkC8UU2<REDACTED>
"
But having issues while accessing from webpage using axios.

Any help here is appreciated.
Thanks

Return to “GpsGate for Developers”