All Projects → tghosgor → libashttp

tghosgor / libashttp

Licence: LGPL-3.0, GPL-3.0 licenses found Licenses found LGPL-3.0 COPYING.LESSER GPL-3.0 COPYING
A C++ async HTTP client library to use in asynchronous applications while communicating with REST services.

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to libashttp

feign-opentracing
OpenTracing Feign integration
Stars: ✭ 20 (-60.78%)
Mutual labels:  http-client
zenith
⚡ Functional Scala HTTP server, client, and toolkit.
Stars: ✭ 15 (-70.59%)
Mutual labels:  http-client
malloy
A C++ library providing embeddable server & client components for both HTTP and WebSocket.
Stars: ✭ 29 (-43.14%)
Mutual labels:  http-client
swish
C++ HTTP requests for humans
Stars: ✭ 52 (+1.96%)
Mutual labels:  http-client
csharp-http-client
Twilio SendGrid's C# HTTP Client for calling APIs
Stars: ✭ 25 (-50.98%)
Mutual labels:  http-client
hunt-http
http library for D, support http 1.1 / http 2.0 (http2) / websocket server and client.
Stars: ✭ 29 (-43.14%)
Mutual labels:  http-client
xhttpc
Extensible HTTP Client for Erlang
Stars: ✭ 25 (-50.98%)
Mutual labels:  http-client
clj-http-hystrix
A Clojure library to wrap clj-http requests as hystrix commands
Stars: ✭ 21 (-58.82%)
Mutual labels:  http-client
requester
The package provides a very thin wrapper (no external dependencies) for http.Client allowing the use of layers (middleware).
Stars: ✭ 14 (-72.55%)
Mutual labels:  http-client
watermelon-http-client
GitHub Action to perform HTTP requests. Supports GraphQL!
Stars: ✭ 21 (-58.82%)
Mutual labels:  http-client
bow-openapi
🌐 Functional HTTP client generator from an OpenAPI/Swagger specification.
Stars: ✭ 47 (-7.84%)
Mutual labels:  http-client
aiohttp-json-rpc
Implements JSON-RPC 2.0 using aiohttp
Stars: ✭ 54 (+5.88%)
Mutual labels:  http-client
domhttpx
domhttpx is a google search engine dorker with HTTP toolkit built with python, can make it easier for you to find many URLs/IPs at once with fast time.
Stars: ✭ 59 (+15.69%)
Mutual labels:  http-client
minreq
Simple, minimal-dependency HTTP client.
Stars: ✭ 91 (+78.43%)
Mutual labels:  http-client
java-restify
Java Restify - Simple interface-based HTTP client for Java
Stars: ✭ 31 (-39.22%)
Mutual labels:  http-client
fitch.js
A lightweight Promise based HTTP client, using Fetch API.
Stars: ✭ 35 (-31.37%)
Mutual labels:  http-client
http-requests
An HTTP client abstraction that provides a common interface to several different client implementations.
Stars: ✭ 22 (-56.86%)
Mutual labels:  http-client
foxy
Session-based Beast/Asio wrapper requiring C++14
Stars: ✭ 61 (+19.61%)
Mutual labels:  http-client
http-accept
Parse Accept and Accept-Language HTTP headers in Ruby.
Stars: ✭ 69 (+35.29%)
Mutual labels:  http-client
axios-case-converter
Axios transformer/interceptor that converts snake_case/camelCase
Stars: ✭ 114 (+123.53%)
Mutual labels:  http-client

libashttp

An asynchronous HTTP library using Boost.ASIO as the backend.

This project is licensed under:

LGPLv3

Usage

Here is a example usage which is taken from the repository:

auto client = ClientHTTPS::create("www.google.com", ioService);

{
  auto request = client->get("/");

  {
    request->onHeader([](const ErrorCode& ec, const Header& header) {
      std::cout << "request onheader " << ec << std::endl;

      std::cout << std::endl << "Header received; ec: " << ec << std::endl;

      std::cout << header.field() << std::endl;
    }).onBodyChunk([](const ErrorCode& ec, std::istream& is, std::size_t chunkSize) {
      std::cout << "request onbodychunk chunksize: " << chunkSize << ", ec: " << ec << std::endl;

      if (!ec) {
        std::cout << std::endl << "Body chunk received; ec: " << ec << std::endl;

        std::copy_n(std::istreambuf_iterator<char>{is}, chunkSize, std::ostreambuf_iterator<char>{std::cout});

        std::cout << std::endl;

        if (chunkSize == 0)// this is the last chunk
          std::cout << "all chunks received" << std::endl;
      }
    }).onTimeout([]() {
      std::cout << "timeout" << ec << std::endl;
    }).onComplete([client, request](const ErrorCode& ec) {
      std::cout << "oncomplete" << ec << std::endl;

      ioService.stop();
    });

    client->schedule(request);
  }
}

More through examples can be found in the repository.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].