Hi, I wasnt sure if I should post in here or start a new question, as its not been updated recently.
I've been trying this and don't get any successful results.
This is the input which is an example given on the ORS website and gives results correct using Git Bash
curl -X POST \
'https://api.openrouteservice.org/v2/directions/driving-car' \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \
-H 'Authorization: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-d '{"coordinates":[[8.681495,49.41461],[8.686507,49.41943],[8.687872,49.420318]]}'type or paste code here
{"error":{"code":2002,"message":"Parameter 'coordinates' has incorrect value or format."},"info":{"engine":{"build_date":"2024-03-21T13:55:54Z","version":"8.0.0"},"timestamp":1715408546132}}
I've tried various things including the "join" method mentioned above.
Any ideas ?
{"error":{"code":2002,"message":"Parameter 'coordinates' has incorrect value or format."},"info":{"engine":{"build_date":"2024-03-21T13:55:54Z","version":"8.0.0"},"timestamp":1715416191406}}
I used a tip from one of your replies to someone else's question to convert text to number as and it took me a little while to realise that the OSR API takes coordinates in longitude, latitude order. which now works fine.
I was looking for distance and duration only not directions, which are returned in meters and seconds which I have converted ok for my needs mathematically but out of curiosity I had a play around with trying to set the output to miles.
Changing this on the "API playground" adds "units":"mi" to the data line of the curl
But I couldnt find a way to add it to the line without turning it back into strings.
For my needs it's not important but curiosity makes me wonder how or if it would be possible to add the text without the extra "'s.
OK cool, ill need to try and remember that, lists dictionaries tuples and sets and things can get confusing.
I've done the multiplication thing to convert my strings to numbers as in my last post ok, they are taken from a list of markers and all works well.
Thank you for your time and patience.
Hellooo everyone,
I’ve got some exciting news for you all – Getaix’s cURL to Blocks just got an upgrade!
I've been away for a bit, but lately, I've been working on Getaix.com by fixing bugs and adding new features to it.
Fix Mistakes - is a new feature which will fix issue in your curl command, though it won't generate blocks magically for you, it can help to fix your cURL syntax