Staging:CC3120 HTTP Client

Overview
This sample application demonstrates how to use HTTP Client Library (in minimum mode) to communicate with an HTTP server.

Application Details
The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web.

This sample application demonstrates the usage of HTTP Client library for HTTP based application development in minimum mode. This application demonstrates:
 * Connect to an AP
 * Connect to an HTTP Server with and without proxy
 * Performs 4 most common HTTP operations - POST, DELETE, PUT, and GET
 * Parse JSON data using JSMN

For more details on HTTP, please refer to Wikipedia Article: HTTP.

Source Files Details

 * main.c - Application code. Initializes the device in default configuration and performs all application tasks.

HTTP Client Library Details
TI provides the HTTP Client library code to simplify your development process. The library project enviroment can be found under the directory \platform\msp432p401r\library_project_ccs\lib_http.

The HTTP client library support two modes:
 * 1) Minimum Mode - suports synchronous mode, redirection handling, chunked transfer encoding, proxy and TLS.
 * 2) Full Mode - supports all the features of the minimal mode along with asynchronous mode and content handling and requires RTOS support.

To compile the library in either Minimum or Full mode, please add/remove the HTTPCli_LIBTYPE_FULL flag in the project preprocessor.

Precompiled library binaries are provided in both Output_Full and Output_Minimum subdirectories of the library project directory.

JSMN Library Details
The open source JSON parser JSMN is used in this application. The library project enviroment can be found under the directory \platform\msp432p401r\library_project_ccs\lib_json_parser. Precompiled library binary file is provided.

Prerequisite

 * 1x CC3120BOOST
 * 1x MSP432-EXP432P401R
 * 1x Micro-USB cable
 * 1x 2.4GHz AP with internet access

Configurations
At the top of the main.c file, set the target HTTP server address and port. In this example, we use httpbin.org.

Example Use Cases and Outputs
Simply compile and run the application. You should see the following console print out. For instructions on how to compile a project and to bring up a terminal, please refer to CC3120 Getting Started guide.

Limitations/Known Issues

 * Default library and application code doesn't support IPv6. Please modify the source code to enable it.