Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Updated Mar 2025

coreHTTP

coreHTTP

HTTP C client library for small IoT devices (MCU or small MPU)

Introduction

The coreHTTP library is a client implementation of a subset of the HTTP/1.1external_link standard. The HTTP standard provides a stateless protocol that runs on top of TCP/IP and is often used in distributed, collaborative, hypertext information systems.

The coreHTTP library implements a subset of the HTTP/1.1external_link protocol standard. This library has been optimized for a low memory footprint. The library provides a fully synchronous API to allow applications to completely manage their concurrency. The library also operates only on fixed buffers, so that applications have complete control of their memory allocation strategy.

The library provides a high-level simple API to serialize request headers, send the request, and receive the response.

The library is decoupled from the underlying network drivers through a two-function send and receive transport interface. The application writer can select an existing transport interface or implement their own, as appropriate for their application.

The library is written in C and designed to be compliant with ISO C90external_link and MISRA C:2012external_link. The library's only dependencies are the standard C library and LTS version (v12.19.1) of http-parserexternal_link from Node.js. The library has proofsexternal_link showing safe memory use and no heap allocation, making it suitable for IoT microcontrollers, but also fully portable to other platforms.

When using HTTP connections in IoT applications, we recommend that you use a secure transport interface, such as one that uses the TLS protocol as demonstrated in the HTTP TLS demo.

This library can be freely used and is distributed under the MIT open source license.

Code Size of coreHTTP (example generated with GCC for ARM Cortex-M)

FileWith -O1 OptimizationWith -Os Optimization
core_http_client.c3.2K2.6K
api.c (llhttp)2.6K2.0K
http.c (llhttp)0.3K0.3K
llhttp.c (llhttp)17.915.9
Total estimates23.9K20.7K