Skip to main content
  • 产品
  • Evaluate our Software
  • 下载
  • Free Utilities
  • 购买
  • 支持
  • 关于我们
  • Search
    • Contact Us
    • Forum
    • Knowledge Base
    • Newsletter
    • RSS
  •   工作机会
  •   视频
  •   永续性
  • IoT Toolkit
  • HTTP Client
  • Components

HTTP client
IoT Toolkit

The HTTP client library is part of the IoT toolkit that allows easy integration and handling of the HTTP protocol in an application.

Contact us
Downloads
Documentation
SEGGER IoT Toolkit
  1. 1.Overview
    1. 1.1.Why SEGGER's HTTP Client?
    2. 1.2.Key features
  2. 2.Easy to use API
  3. 3.Requirements
  4. 4.Secure connections
  5. 5.The SEGGER IoT Toolkit evaluation package
  6. 6.HTTP client samples
    1. 6.1.Grabbing a non-secure webpage using IOT_HTTP_GetRequest.exe
    2. 6.2.Grabbing a secure webpage from a redirect using IOT_HTTP_SecureGet.exe

Overview

The HTTP client library is part of the IoT toolkit that allows easy integration and handling of the HTTP protocol in an application without having to deal with the RFC documents it is based on. This allows you to not only request simple webpages but to use powerful IoT REST APIs in the same simple fashion.

Although the HTTP protocol is mostly associated with retrieving web pages from the Internet, the HTTP client is mainly intended to interacting with REST APIs. Retrieving regular web content of course is easily doable as well. The HTTP client implements the Internet Standard [RFC 2616] that is used by popular IoT REST APIs like Dropbox, Xively and many more.

Why SEGGER's HTTP Client?

SEGGER's HTTP client is fully compliant to the standards involved behind the HTTP protocol that you need to keep in mind when talking to modern REST based IoT services.

By providing a simple to use API for constructing your requests and fetching the data without getting in touch with the underlying protocol allows you to stay focused on your actual application with full confidence that everything will simply work.

Sample applications and demos are available to show how simple it can be to work with HTTP based APIs like REST.

SEGGER has developed the HTTP client from scratch to keep stack usage as small as possible and memory requirements to a minimum.

Key features

  • Memory efficient and easy to use API
  • Supports building HTTP requests in simple steps
  • Supports any HTTP method like GET, POST, DELETE, ...
  • Supports adding custom header fields in the HTTP request
  • Can easily be extended for secure connections

Easy to use API

Using the HTTP client API, constructing a request is done in only a couple of lines of simple code.

IOT_HTTP_AddMethod(&HTTP, "GET");
IOT_HTTP_AddHost(&HTTP, "www.segger.com");
IOT_HTTP_SetPort(&HTTP, 80);
IOT_HTTP_AddPath(&HTTP, "/");

Requirements

The HTTP client requires a TCP/IP stack. It can be used with any RFC-compliant TCP/IP stack. The shipment includes source code samples and Win32 binaries of the samples using the standard Winsock API and can be easily adopted to any standard TCP/IP stack like emNet.

Secure connections

While still many resources on the Internet are available using unsecured connections, more and more services become accessible via secured connection only, making it a standard to support. The HTTP client is not limited to plain unsecured connections. It can be easily extended to support secure connections by using any standard TLS stack like emSSL. This allows the HTTP client to still use unsecured connections for simple tasks like fetching a webpage that does not need security at all while at the same time supporting secure connections for modern IoT APIs.

The SEGGER IoT Toolkit evaluation package

A collection of free Windows executables is available for evaluation purposes to show the functionality of the components of the IoT Toolkit.
You can download the IoT Toolkit evaluation package from the following location: IoT Toolkit evaluation package

HTTP client samples

The following is an excerpt of the samples that can be downloaded with the IoT Toolkit evaluation package in binary form. The shipment also includes the source code to these samples.

Grabbing a non-secure webpage using IOT_HTTP_GetRequest.exe


This executable establishes a plain socket connection to http://www.segger.com and returns the content of the page read. As today's standard is to use a secure connection via HTTPS the page returned is a redirect to the secured version of the website.

HTTP GetRequst Combined

Grabbing a secure webpage from a redirect using IOT_HTTP_SecureGet.exe


This executable first establishes a plain socket connection to http://www.segger.com and returns the content of the page read. As today's standard is to use a secure connection via HTTPS the page returned is a redirect to the secured version of the website.

The sample follows the redirect to https://www.segger.com and based on the "https" scheme it established a secure connection to the website to read and return its content.

HTTP SecureGet Combined

全球总部

德国: SEGGER Microcontroller GmbH

地址: Ecolab-Allee 5
40789 Monheim am Rhein, Germany
电邮: info@segger.com
电话: +49-2173-99312-0
传真: +49-2173-99312-28

网点分布

中国:哲戈微系统科技(上海)有限公司

地址: 中国上海市闵行区秀涟路133号
大虹桥国际A 栋218室
邮编201199
电邮: china@segger.com
电话: +86-133-619-907-60

通过ISO 9001认证

ISO 9001

30多年的嵌入式行业经验

First-class embedded software tools since 1992
  • 版本说明
  • 免责声明
  • 隐私策略
  • 沪ICP备2022005181号
  • 沪公网安备 31011202014525号
© 2025 SEGGER - 版权所有.

您即将离开 segger.cn 而访问境外网站,是否继续?