Skip to content

Repository files navigation

BeastQuest

Travis CIDocumentationLicenseCoverage Status

BeastQuest is an easy-to-use HTTP request library for C++ made by humans for humans. This library is heavily inspired by C++ Requests and Python Requests. This was largely created as a proof-of-concept project utilizing the Boost Beast library that was introduced in Boost 1.66.

Features

Because Boost Beast only provides a protocol-level interface for HTTP, many features have to be implemented from scratch. The following features are not available at the moment:

  • Timeout specification
  • Streaming requests
  • Cookie support
  • Proxy support

But the following features are supported!

  • GET, POST, DELETE, PUT, and PATCH requests
  • SSL/TLS requests (with or without verification)
  • Asynchronous requests
  • Callback interface
  • Custom request headers/body
  • Url encoded parameters
  • Simple POST forms
  • Multipart POST forms
  • File POST upload
  • Basic authentication

Documentation

Documentation is located here and includes in-depth information on building and usage. It will continue to be updated and improved.

Usage

Using the synchronous API. doing a GET request is as simple as:

#include<beastquest/beastquest.hh>
#include<iostream>intmain() {
quest::Url url("https://httpbin.org/get");
auto response = quest::Get(url);
if (response.status_code == 200)
std::cout << response.content << std::endl;
return0;
}

The sync and async APIs are built on top of a session-layer API) that also aims to be simple and easy-to-use.

Third-Party Libraries

The following libraries are used in this project:

About

An easy-to-use HTTP request library for C++ using the Boost Beast library

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages