glitchedhttps
Glitched HTTPS

Introduction

Glitched HTTPS is a simple, lightweight and straight-forward way of doing HTTP(S) requests in C with the help of ARM's open-source MbedTLS library.

Dependencies

Installation

See the git repository's README.md for instructions on how to get started with this.

Usage

Inside the git repo's examples/ folder you can find many examples on how to make requests using Glitched HTTPS.

Furthermore, here is a list of the most important types used within Glitched HTTPS:

  • glitchedhttps_header - This is a HTTP header (the ones you find in an HTTP request or response).
  • glitchedhttps_method - An enumeration that specifies the HTTP method to use for a request (e.g. "GET", "POST", ...).
  • glitchedhttps_request - Struct containing all the parameters necessary for an HTTP request (HTTP Method, Body, URL, which MUST contain either the scheme http:// or https://, etc...).
  • ➥ You can allocate this on the stack right before submitting the request if you want, just as seen as in the PUT request example.
  • glitchedhttps_response - HTTP Response data. This struct contains the mapped status code, response content (body), and all the headers..
  • ➥ Must be freed using the glitchedhttps_response_free() function!

Also: check out the glitchedhttps_exitcodes.h header file to find out what each of the Glitched HTTPS functions' exit codes means!