C/C++ HTTP Client Library for Embedded Projects

thegreendroid picture thegreendroid · May 24, 2014 · Viewed 34.3k times · Source

So I have trawled through pages and pages of search results on StackOverflow and Google and I have come across very few C/C++ HTTP client libraries suitable for a resource-constrained, embedded environment (e.g. an ARM). I have however come across quite a few that are suitable for desktop-class applications.

Essentially, I am after a simple, easy-to-use and convenient API to make HTTP GET, POST and HEAD calls (with support for authentication, download resume and payload compression). It would be ideal if it had a small footprint (i.e. no or minimal external dependencies) and is open-source (with a permissive license).

Here's a list of what I've come across so far and why they are not suitable -

  • curl - too heavyweight
  • poco - too heavyweight
  • neon - GPL
  • qlibc - relies on POSIX libraries
  • cpp-netlib - relies on Boost libraries
  • serf - relies on the Apache Portable Runtime library
  • urdl - relies on Boost libraries
  • HTTP Client C API - promising but requires a C++ wrapper

Are there any libraries out there that I am unaware of or am I better off rolling my own?

Answer

escrafford picture escrafford · May 26, 2014

Have you taken a look at the HTTPClient on mbed? Looks like there are lots of forks of an original from a few years ago that wasn't maintained. I haven't used this...

http://mbed.org/users/WiredHome/code/HTTPClient/