This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Use Restful api using c++ and libcurl

-1

How can i use the restful api using c++ and libcurl?

thanks in advance, Kenji

asked 27 Jan '14, 01:19

Kenji%20Gabriel's gravatar image

Kenji Gabriel
-1334
accept rate: 0%

edited 27 Jan '14, 07:52

iii's gravatar image

iii
4.9k84082

2

which API (API might clarify) do you mean? What do you want to do? How is your question related to oauth (which you have added as tag)? And please focus on OpenStreetMap-related issues rather than general programming.

(27 Jan '14, 01:59) aseerel4c26 ♦

As written, this sounds more like a libcurl question than an OSM one. What are you actually trying to do? Other providers of map data may require you to access it through an API, but OSM allows you to just download it all, if that's what you want.

(27 Jan '14, 09:51) SomeoneElse ♦

2 Answers:

0

AFAIK we don't have an ready to use lib to invoke our web APIs via C++ but call me wrong https://wiki.openstreetmap.org/wiki/Frameworks

If you just want to read data, you might consider using the OverpassAPI or dumps instead.

answered 27 Jan '14, 07:51

iii's gravatar image

iii
4.9k84082
accept rate: 10%

0

One thing that you will absolutely have to do if you're calling an API at OpenStreetMap is to set a valid user agent. A number of applications have found themselves blocked recently because they didn't do that.

answered 27 Jan '14, 09:49

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Source code available on GitHub .