C++ Requests: Curl for People, a spiritual port of Python Requests.

Overview

C++ Requests: Curl for People

Documentation CI Gitter

Announcements

TLDR

C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project.

Despite its name, libcurl's easy interface is anything but, and making mistakes misusing it is a common source of error and frustration. Using the more expressive language facilities of C++11, this library captures the essence of making network calls into a few concise idioms.

Here's a quick GET request:

#include <cpr/cpr.h>

int main(int argc, char** argv) {
    cpr::Response r = cpr::Get(cpr::Url{"https://api.github.com/repos/whoshuu/cpr/contributors"},
                      cpr::Authentication{"user", "pass"},
                      cpr::Parameters{{"anon", "true"}, {"key", "value"}});
    r.status_code;                  // 200
    r.header["content-type"];       // application/json; charset=utf-8
    r.text;                         // JSON text string
    return 0;
}

And here's less functional, more complicated code, without cpr.

Documentation

Documentation
You can find the latest documentation here. It's a work in progress, but it should give you a better idea of how to use the library than the tests currently do.

Features

C++ Requests currently supports:

  • Custom headers
  • Url encoded parameters
  • Url encoded POST values
  • Multipart form POST upload
  • File POST upload
  • Basic authentication
  • Bearer authentication
  • Digest authentication
  • NTLM authentication
  • Connection and request timeout specification
  • Timeout for low speed connection
  • Asynchronous requests
  • 🍪 support!
  • Proxy support
  • Callback interfaces
  • PUT methods
  • DELETE methods
  • HEAD methods
  • OPTIONS methods
  • PATCH methods
  • Thread Safe access to libCurl
  • OpenSSL and WinSSL support for HTTPS requests

Planned

For a quick overview about the planed features, have a look at the next Milestones.

Usage

CMake

If you already have a CMake project you need to integrate C++ Requests with, the primary way is to use fetch_content. Add the following to your CMakeLists.txt.

include(FetchContent)
FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git
                         GIT_TAG beb9e98806bb84bcc130a2cebfbcbbc6ce62b335) # The commit hash for 1.7.2. Replace with the latest from: https://github.com/libcpr/cpr/releases
FetchContent_MakeAvailable(cpr)

This will produce the target cpr::cpr which you can link against the typical way:

target_link_libraries(your_target_name PRIVATE cpr::cpr)

That should do it! There's no need to handle libcurl yourself. All dependencies are taken care of for you.
All of this can be found in an example here.

Packages for Linux Distributions

Alternatively, you may install a package specific to your Linux distribution. Since so few distributions currently have a package for cpr, most users will not be able to run your program with this approach.

Currently, we are aware of packages for the following distributions:

If there's no package for your distribution, try making one! If you do, and it is added to your distribution's repositories, please submit a pull request to add it to the list above. However, please only do this if you plan to actively maintain the package.

Requirements

The only explicit requirements are:

  • a C++11 compatible compiler such as Clang or GCC. The minimum required version of GCC is unknown, so if anyone has trouble building this library with a specific version of GCC, do let me know
  • If you would like to perform https requests OpenSSL and its development libraries are required.

Building cpr - Using vcpkg

You can download and install cpr using the vcpkg dependency manager:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install cpr

The cpr port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

Building cpr - Using Conan

You can download and install cpr using the Conan package manager. Setup your CMakeLists.txt (see Conan documentation on how to use MSBuild, Meson and others). An example can be found here.

The cpr package in Conan is kept up to date by Conan contributors. If the version is out of date, please create an issue or pull request on the conan-center-index repository.

Issues
  • cmake config

    cmake config

    I'm still creating a FreeBSD port, and it would be great to have a cmake config for cpr in order to do stuff like find_package(cpr).

    Thank you very much in advance.

    opened by part1zano 30
  • progress callback draft

    progress callback draft

    Hi! I added an issue here #432 a few minutes ago, but then i realised that there was an already existing issue that's been open for quite a while sadly #111.

    This is a quick draft / example of adding a progress callback option, and it works 😄 . This allows us to create progress bars and also cancel any request early by returning a non zero value from the callback!

    If there's any chance of adding this and you want me to clean up anything, let me know! Thanks

    Tests Needed :rotating_light: Feature :sparkles: Documentation Needed :green_book: 
    opened by ITotalJustice 20
  • "free(): invalid pointer" when using CPR with conan

    Description

    When using CPR with conan I get this error when trying to run the binary

    free(): invalid pointer
    Aborted
    

    Expected Behavior

    Should work

    Actual Behavior

    It breaks

    Possible Fix

    Steps to Reproduce

    1. Use CPR with conan

    Context

    I was trying to reach out to a website and get the response body/text.

    Your Environment

    • Version used: 1.6.2
    • Where did you get it from (e.g. conan, vcpkg, master, ...): conan
    • Operating System and version: Linux ari-gentoo 5.14.2-gentoo #1 SMP Thu Sep 9 18:26:44 EEST 2021 x86_64 Intel(R) Core(TM) i3-8130U CPU @ 2.20GHz GenuineIntel GNU/Linux
    • Link to a small example: https://replit.com/@B00bleaTea/ghufhuerhyur4gyfghryfhryhfyufhurehufberfhberhbfhuerbfhuerf#main.cpp

    Run this when trying the example (in the shell tab):

    chmod a+rx ./build.sh
    
    ./build.sh
    
    ./bin/conantest 'https://google.com'
    
    Bug :bug: Needs Investigation :mag: 
    opened by TruncatedDinosour 17
  • Static linking (Windows)

    Static linking (Windows)

    Hello. I am trying to use a static version of the library installed through VCPKG using the command./vcpkg install cpr:x86-windows-static but i am getting many errors. image

    This are my settings: image image

    Bug :bug: Build :construction_worker: Windows :tv: 
    opened by John4266 17
  • Provide CPRConfig.cmake to allow easy find_package()

    Provide CPRConfig.cmake to allow easy find_package()

    I'm all but a cmake expert but if I interpret this http://www.cmake.org/cmake/help/git-master/manual/cmake-packages.7.html#creating-packages link and my cmake output correctly, supplying CPRConfig.cmake would allow downstream projects to include cpr as a dependency like this:

     set ( CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} vendor/cpr/)
     find_package ( CPR REQUIRED )
     include_directories ( ${CPR_INCLUDE_DIRS} )
    

    and then use ${CPR_LIBRARIES} in target_link_libraries(). Instead of vendoring it could also be installed in the system path getting rid of the first line in the snippet above.

    Documentation :books: Build :construction_worker: 
    opened by niklas88 17
  • Empty response text and status code 0 at example code

    Empty response text and status code 0 at example code

    Code

    #include <cpr/cpr.h>
    #include <iostream>
    
    int main(int argc, char** argv) {
        cpr::Response r = cpr::Get(cpr::Url{"https://api.github.com/repos/whoshuu/cpr/contributors"},
                          cpr::Authentication{"user", "pass"},
                          cpr::Parameters{{"anon", "true"}, {"key", "value"}});
        std::cout << r.status_code << std::endl << r.text;
        return 0;
    }
    

    Expected Behavior

    It should print the status code and the response body

    Actual Behavior

    It prints 0

    Your Environment

    • Where did you get it from (e.g. conan, vcpkg, master, ...): master
    • Operating System and version: MacOS 12.1
    • Build System: g++/clang++
    Needs Investigation :mag: 
    opened by Pxddyk45 16
  • Add ability to install library and headers through CMake

    Add ability to install library and headers through CMake

    There are three competing pull requests right now that implement this. My laziness has unfortunately resulted in some duplicate work 😥 .

    #176 #132 #56

    Unbiased discussion on the pros and cons of each approach would be appreciated. The immediate goal is to make make install in a sane way. The long term goal is to make packaging the library (for something like Homebrew for instance) feasible so it can be distributed without git.

    Build :construction_worker: Discussion :interrobang: 
    opened by whoshuu 15
  • Problems with HTTPS requests.

    Problems with HTTPS requests.

    Description

    The problem occurs when I'm trying to send any type of request to an https server. With http it works just fine. If server supports both, http and https it also works when I'm trying to send https request. To make sure that issue is actual I tried to install libcpr on another computer, and it did the same. Moreover, I used libcpr for a month and there were no problems ever, but as soon as I reinstalled the library, this happened. Also, I tried to test libCurl, and it sends https requests to any server.

    Expected Behavior

    Sending HTTPS requests as always.

    Actual Behavior

    Does send only HTTP requests and returns code 0 when trying to send HTTPS.

    Your Environment

    • Version used: 1.7.2
    • Where did you get it from (e.g. conan, vcpkg, master, ...): vcpkg
    • Operating System and version: Windows 10 Pro 21H1, Build 19043.1526
    • Link to a small example: https://imgur.com/4TOPax9
    curl :globe_with_meridians: 
    opened by 1Klas 14
  • CPR on Raspberry Pi

    CPR on Raspberry Pi

    Hi there,

    For a home project I would like to use CPR on the raspberry pi 2b+. I made a small test program to read and write data to a Rest Api, but the POST request hangs forever and is not executed on the Rest Api. The GET request works fine. I build the the same code also on my desktop(Ubuntu 20.04 amd64) and that gives no problems. My first attempt was cross-compiling with various toolchains, but it always hangs on the POST/PUT request. Finally I did a local build on the raspberry pi and it kept hanging on the POST request.

    The c++ code is:

    #include <iostream>
    #include <cpr/cpr.h>
    #include "nlohmann/json.hpp"
    
    using json = nlohmann::json;
    
    int main()
    {
    	std::cout << "Hello World\n";
    
    	auto r = cpr::Get(cpr::Url("http://192.168.10.188:3001/environment?select=location,pressure"));
    
    		std::cout << r.status_code << std::endl;
    		std::cout << r.header["content-type"] << std::endl;
    		std::cout << r.text << std::endl;
    
    	json msg;
    	msg["location"] = "livingroom";
    	msg["temperature"] = 27.5;
    	msg["pressure"] = 1006.1;
    	msg["humidity"] = 61;
    	msg["time"] = "2020-07-01T13:21:22.18542+00:00";
    	std::cout << msg.dump() << std::endl;
    	r = cpr::Post(cpr::Url("http://192.168.10.188:3001/environment"),
    				  cpr::Header{{"Content-Type", "application/json"},
    							  {"Content-Length", std::to_string(msg.dump().length())}},
    				  cpr::Body(msg.dump()));
    
    	std::cout << r.status_code << std::endl;
    	std::cout << r.header["content-type"] << std::endl;
    	std::cout << r.text << std::endl;
    
    	return 0;
    }
    

    my makefile is:

    OBJECTS=build/main.o 
    
    BUILDDIR=build/
    SOURCEDIR=src/
    LIB=-L/usr/local/lib/ -L/usr/local/lib
    # include the src directory for rapidjson and spdlog includes
    INC=-Isrc
    MKDIR_P = mkdir -p
    
    .PHONY : all
    all: $(BUILDDIR)testCprSimple
    
    $(BUILDDIR)testCprSimple : $(OBJECTS)
    	g++ -o $(BUILDDIR)testCprSimple $(OBJECTS) $(LIB) -latomic -lcpr -lcurl
    
    $(BUILDDIR)main.o : $(SOURCEDIR)main.cpp
    	g++ -o $(BUILDDIR)main.o $(SOURCEDIR)main.cpp -std=c++14 $(INC) -g3 -O2 -Wall -c -fmessage-length=0
    
    # There are two reasons to use a phony target: 
    # to avoid a conflict with a file of the same name, and to improve performance. 	
    .PHONY: clean
    clean :
    	rm $(BUILDDIR)testCprSimple $(OBJECTS)
    # Tab must be used as indentation
    

    I am using 2020-02-13-raspbian-buster-lite as OS on the raspberry pi with gcc (Raspbian 8.3.0-6+rpi1) 8.3.0

    I have installed and build CPR successfully on the raspberry pi with:

    git clone https://github.com/whoshuu/cpr.git
    cd cpr
    git submodule update --init
    mkdir build; cd build
    cmake -DCMAKE_USE_OPENSSL=OFF ..
    make
    sudo make install
    

    The curl program itself is working with POST request on the pi: curl http://192.168.10.188:3001/environment -X POST -H "Content-Type: application/json" -d '{"location":"livingroom", "temperature":23.2,"pressure":1002.5, "humidity":49, "time":"2020-07-01T13:21:22.18542+00:00"}'

    Am i forgetting something for the raspberry pi / arm build or is it a bug? Thanks in advance for your help.

    Bug :bug: 
    opened by skipper85 14
  • HTTP Error 411 while making POST request to Microsoft Azure Workspace

    HTTP Error 411 while making POST request to Microsoft Azure Workspace

    I am trying to set up a remote log system on the Microsoft Azure Workspace. I am using cpr POST request to send sample JSON data over to the server. The code I used is as follows:

    #include <iostream>
    #include <map>
    #include <utility>
    #include <nlohmann/json.hpp>
    using json = nlohmann::json;
    #include <cpr/cpr.h>
    #include <time.h>
    using std::cout;
    using std::cerr;
    using std::endl;
    
    #include <string>
    using std::string;
    
    #include "cryptopp/cryptlib.h"
    using CryptoPP::Exception;
    
    #include "cryptopp/hmac.h"
    using CryptoPP::HMAC;
    
    #include "cryptopp/sha.h"
    using CryptoPP::SHA256;
    
    #include "cryptopp/base64.h"
    using CryptoPP::Base64Encoder;
    using CryptoPP::Base64Decoder;
    
    #include "cryptopp/filters.h"
    using CryptoPP::StringSink;
    using CryptoPP::StringSource;
    using CryptoPP::HashFilter;
    
    
    
    typedef unsigned char byte;
    
    string CUSTOMER_ID = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
    string SHARED_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
    string METHOD = "POST";
    string CONTENT_TYPE = "application/json";
    string RESOURCE = "/api/logs";
    string uri = "https://" + CUSTOMER_ID + ".ods.opinsights.azure.com/api/logs?api-version=2016-04-01";
    string uri2 = "https://postman-echo.com/post";
    
    string sign(string key, string plain)
    {
        string mac, encoded;
        try
        {
    
            HMAC< SHA256 > hmac((byte*)key.c_str(), key.length());
    
            StringSource(plain, true,
                         new HashFilter(hmac,
                                        new StringSink(mac)
                         ) // HashFilter
            ); // StringSource
        }
        catch(const CryptoPP::Exception& e)
        {
            cerr << e.what() << endl;
        }
    
        encoded.clear();
        StringSource(mac, true,
                     new Base64Encoder(
                             new StringSink(encoded)
                     ) // Base64Encoder
        ); // StringSource
    
        return encoded;
    }
    
    string getTimestamp()
    {
        char buf[1000];
        time_t now = time(0);
        //struct tm tm = *localtime(&now);
        struct tm *tm = gmtime(&now);
        strftime(buf, sizeof buf, "%a, %d %b %Y %H:%M:%S GMT", tm);
        cout << buf << endl;
        return buf;
    
    }
    
    string getSignature(const string& customer_id, const string& shared_key, const string& date, size_t content_length,
                        const string& method, const string& content_type, const string& resource)
    {
        string x_headers = "x-ms-date:" + date;
        string string_to_hash = (method + "\n" + std::to_string(content_length) + "\n" + content_type + "\n" + x_headers + "\n" + resource);
        string decoded_share_key;
        decoded_share_key.clear();
        StringSource(shared_key,true, new Base64Decoder( new StringSink(decoded_share_key)));
        string encoded_hash = sign(decoded_share_key,string_to_hash);
    
        string signature = "SharedKey "+ customer_id + ":" +encoded_hash;
                //SharedKey {customer_id}:{encoded_hash}
    
        cout << signature << endl;
    
        return signature;
    }
    
    
    void post(string customer_id, string shared_key, string body, string log_type)
    {
        string date = getTimestamp();
    
        string signature = getSignature(CUSTOMER_ID, SHARED_KEY, date,
                                        body.length(), METHOD,
                                        CONTENT_TYPE, RESOURCE);
    
        auto response = cpr::Post(cpr::Url(uri),
                                    cpr::Header{{"content-type",CONTENT_TYPE},
                                                {"Authorization",signature},
                                                {"log-type",log_type},
                                                {"x-ms-date", date},
                                                {"content-length",std::to_string(body.length())}},
                                    cpr::Body(body));
    
    
    
        cout << response.url << endl;
        try {
            json j = json::parse(response.text);
            cout << j.dump(4) << endl;
        }
        catch (std::exception& e) {
            cout << e.what() << endl << endl;
            cout << response.text << endl;
        }
        cout << response.status_code << endl;
        if(response.status_code!=200)
        {
           cout << response.error.message << endl;
        }
        cout << response.elapsed << endl;
    }
    
    
    int main() {
        
        string log_type = "LoggingTest";
    
        json log_msg;
        json msg;
        log_msg["property1"] = "value1";
    
        msg = {log_msg};
    
        post(CUSTOMER_ID, SHARED_KEY, msg.dump(), log_type);
    
    
        return 0;
    }
    

    However, I'm always getting the same error like this (from response.text) :

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
    <HTML><HEAD><TITLE>Length Required</TITLE>
    <META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
    <BODY><h2>Length Required</h2>
    <hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
    </BODY></HTML>
    

    Things I have tried and the results:

    1. Added "content-length" header: Same error
    2. Tried sending empty body with content length zero: Same error
    3. Made POST request to Postman-echo service to see if the library is unable to forward all data: Results as follows -

    3.1 Sending JSON data with authorization header:

    {
        "args": {},
        "data": {},
        "files": {},
        "form": {},
        "headers": {
            "accept": "*/*",
            "authorization": "SharedKey xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "host": "postman-echo.com",
            "user-agent": "curl/7.47.0",
            "x-amzn-trace-id": "Root=1-5ebe2da5-2275dd11f1b39c54c33fa6df",
            "x-forwarded-port": "443",
            "x-forwarded-proto": "https"
        },
        "json": null,
        "url": "https://postman-echo.com/post"
    }
    

    Notice that even though I'm sending JSON data with the POST request, Postman-echo does not show it. This is strange because when I did the same thing using a Python script, the result showed me both the data as well as the authorization signature.

    3.2 Sending JSON data without authorization header:

    {
         "args": {},
        "data": [
            {
                "property1": "value1"
            }
        ],
        "files": {},
        "form": {},
        "headers": {
            "accept": "*/*",
            "content-length": "24",
            "content-type": "application/json",
            "host": "postman-echo.com",
            "log-type": "LoggingTest",
            "user-agent": "curl/7.47.0",
            "x-amzn-trace-id": "Root=1-5ebe2f54-bfcef7b08ee37ca8efe47d90",
            "x-forwarded-port": "443",
            "x-forwarded-proto": "https",
            "x-ms-date": "Fri, 15 May 2020 05:57:40 GMT"
        },
        "json": [
            {
                "property1": "value1"
            }
        ],
        "url": "https://postman-echo.com/post"
    }
    

    Then Postman-echo is showing me the json data sent.

    In my understanding, generated key is not wrong, since in that case, authorization failure is the first error. The same code above, written in Python3 and Python2 worked correctly. This was the link I was following: https://docs.microsoft.com/de-de/azure/azure-monitor/platform/data-collector-api

    Is there any known issue of similar kind in the cpr library? Please help.

    Bug :bug: curl :globe_with_meridians: 
    opened by PatronusCoder 14
  • (0xC0000135) error, using example code

    (0xC0000135) error, using example code

    I'm getting this error code when attempting to run the example code provided in the README:

    #include <cpr/cpr.h>
    
    int main(int argc, char** argv) {
        cpr::Response r = cpr::Get(cpr::Url{"https://api.github.com/repos/whoshuu/cpr/contributors"},
                                   cpr::Authentication{"user", "pass"},
                                   cpr::Parameters{{"anon", "true"}, {"key", "value"}});
        r.status_code;                  // 200
        r.header["content-type"];       // application/json; charset=utf-8
        r.text;                         // JSON text string
    }
    

    CMakeLists.txt:

    cmake_minimum_required(VERSION 3.20)
    project(api_test_2)
    
    set(CMAKE_CXX_STANDARD 14)
    
    add_executable(api_test_2 main.cpp)
    
    include(FetchContent)
    FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git GIT_TAG 67e12da316754ff3c6c91b50aafb2658438f3c1e) # the commit hash for 1.7.0
    FetchContent_MakeAvailable(cpr)
    
    target_link_libraries(api_test_2 PRIVATE cpr::cpr)
    

    But when I attempt to run a I am prompted by a return value (0xC0000135)

    Bug :bug: Windows :tv: Needs Investigation :mag: 
    opened by spralja 13
  • Makefile is not suitable for paths with spaces in it

    Makefile is not suitable for paths with spaces in it

    Description

    Make is not able to execute if spaces (' ') are available in the path.

    Expected Behavior

    Compilation to end successfully

    Actual Behavior

    image

    Possible Fix

    Add quotes in the generated Makefiles

    Steps to Reproduce

    1. Run Windows with MinGW compiler
    2. Run cmake -DCMAKE_BUILD_TYPE=Release -DCPR_BUILD_TESTS=ON -DCPR_FORCE_USE_SYSTEM_CURL=OFF . -G "Unix Makefiles"
    3. Run make MAKE=make CMAKE_COMMAND=cmake

    Context

    I cannot use the library at all.

    Your Environment

    OS:

    Edition         Windows 10 Pro N
    Version         21H2
    Installed on	‎8/‎13/‎2021
    OS build	19044.1586
    Experience	Windows Feature Experience Pack 120.2212.4170.0
    

    Compiler:

    $ g++ -v
    Using built-in specs.
    COLLECT_GCC=C:\MinGW\bin\g++.exe
    COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/lto-wrapper.exe
    Target: x86_64-w64-mingw32
    Configured with: ../src/configure --enable-languages=c,c++ --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-multilib --prefix=/c/temp/gcc/dest --with-sysroot=/c/temp/gcc/dest --disable-libstdcxx-pch --disable-libstdcxx-verbose --disable-nls --disable-shared --disable-win32-registry --enable-threads=posix --enable-libgomp --with-zstd=/c/mingw --disable-bootstrap
    Thread model: posix
    Supported LTO compression algorithms: zlib zstd
    gcc version 11.2.0 (GCC)
    
    Bug :bug: Build :construction_worker: Windows :tv: 
    opened by Alex-Tsvetanov 5
  • Add Interception  just like okhttp?

    Add Interception just like okhttp?

    build a client to manager request for change request/response
    for example we can use Interception to encrypt/decrypt body or add baseurl ,add public header

    this is okhttp demo

    public class TestInterceptor implements Interceptor {
        @Override
        public Response intercept(Chain chain) throws IOException {
     
            return null;
        }
    }
    
    OkHttpClient build = new OkHttpClient.Builder()
                    .addInterceptor(new TestInterceptor())
                    .build();
       
    
    
    Feature :sparkles: 
    opened by sornian 1
  • Instruction how build for ios and android

    Instruction how build for ios and android

    Hello, maybe i am stupid), but i don't understand how build this library for ios and android, it would be nice to have some kind of instructions. Thanks.

    Build :construction_worker: curl :globe_with_meridians: 
    opened by sergeymild 8
  • cpr library error: 'getaddrinfo() thread failed to start' running application in VRF

    cpr library error: 'getaddrinfo() thread failed to start' running application in VRF

    Description

    I'm writing an application that needs to access a remote REST API from a Linux (Ubuntu 20.04) system secured by Virtual Routing and Forwarding.

    If I run my application no special setup, I'm unable to resolve the remote server by name. This is an expected consequence of the server security.

    If I run my application in the VRF environment by prefixing it with ip vrf exec mgt, I get the error in the summary, above.

    I've tried a simple curl https://google.com and I see:

    $ curl https://google.com curl: (6) Could not resolve host: google.com $ sudo ip vrf exec mgt curl https://google.com

    <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
    <TITLE>301 Moved</TITLE></HEAD><BODY>
    <H1>301 Moved</H1>
    The document has moved
    <A HREF="https://www.google.com/">here</A>.
    </BODY></HTML>
    

    So, the problem doesn't seem to be with curl.

    Expected Behavior

    I expect to be able to resolve the remote server's FQDN

    Actual Behavior

    cpr library error: 'getaddrinfo() thread failed to start'

    Possible Fix

    Steps to Reproduce

    Try to POST with cpr within a VRF.

    Context

    I can't resolve the remote server's FQDN.

    Your Environment

    • Version used: 1.7.2, the same problem occurred with 1.6.2 which is why I upgraded
    • Where did you get it from (e.g. conan, vcpkg, master, ...): a fork of cpr, checked out SHA beb9e98806bb84bcc130a2cebfbcbbc6ce62b335
    • Operating System and version: Ubuntu 20.04
    • Link to a small example:
    Bug :bug: curl :globe_with_meridians: 
    opened by ChrisNelson-CyberReef 3
  • Building from source

    Building from source

    How do we build this library from source code? I want to use it in a project which uses a Makefile and doesn't have CMake utilities.

    Here is what I tried -

    mkdir build
    cd build
    cmake .. -DCPR_BUILD_TESTS=OFF
    make install
    

    I used the sample program provided in the README -

    #include <cpr/cpr.h>
    #include <iostream>
    
    int main(int argc, char** argv) {
        cpr::Response r = cpr::Get(cpr::Url{"https://api.github.com/repos/libcpr/cpr/contributors"},
                          cpr::Authentication{"user", "pass"},
                          cpr::Parameters{{"anon", "true"}, {"key", "value"}});
        std::cout << r.status_code;                  // 200
        std::cout << r.header["content-type"];       // application/json; charset=utf-8
        std::cout << r.text;                         // JSON text string
    }
    

    I use g++ to compile the program - g++ cprtrial.cpp

    I run into a bunch of linker errors.

    /tmp/ccEYLUY6.o: In function `main':
    cprtrial.cpp:(.text+0x1f4): undefined reference to `cpr::Parameters::Parameters(std::initializer_list<cpr::Parameter> const&)'
    /tmp/ccEYLUY6.o: In function `cpr::Authentication::Authentication(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)':
    cprtrial.cpp:(.text._ZN3cpr14AuthenticationC2EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_[_ZN3cpr14AuthenticationC5EONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_]+0x27): undefined reference to `vtable for cpr::Authentication'
    /tmp/ccEYLUY6.o: In function `cpr::Authentication::~Authentication()':
    cprtrial.cpp:(.text._ZN3cpr14AuthenticationD2Ev[_ZN3cpr14AuthenticationD5Ev]+0xf): undefined reference to `vtable for cpr::Authentication'
    /tmp/ccEYLUY6.o: In function `cpr::Response cpr::Get<cpr::Url, cpr::Authentication, cpr::Parameters>(cpr::Url&&, cpr::Authentication&&, cpr::Parameters&&)':
    cprtrial.cpp:(.text._ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_[_ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_]+0x32): undefined reference to `cpr::Session::Session()'
    cprtrial.cpp:(.text._ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_[_ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_]+0x84): undefined reference to `cpr::Session::Get()'
    cprtrial.cpp:(.text._ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_[_ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_]+0x91): undefined reference to `cpr::Session::~Session()'
    cprtrial.cpp:(.text._ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_[_ZN3cpr3GetIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEENS_8ResponseEDpOT_]+0xb6): undefined reference to `cpr::Session::~Session()'
    /tmp/ccEYLUY6.o: In function `std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cpr::CaseInsensitiveCompare, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)':
    cprtrial.cpp:(.text._ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_N3cpr22CaseInsensitiveCompareESaISt4pairIKS5_S5_EEEixEOS5_[_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_N3cpr22CaseInsensitiveCompareESaISt4pairIKS5_S5_EEEixEOS5_]+0x88): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
    /tmp/ccEYLUY6.o: In function `void cpr::priv::set_option<cpr::Url, cpr::Authentication, cpr::Parameters>(cpr::Session&, cpr::Url&&, cpr::Authentication&&, cpr::Parameters&&)':
    cprtrial.cpp:(.text._ZN3cpr4priv10set_optionIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEEvRNS_7SessionEDpOT_[_ZN3cpr4priv10set_optionIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEEvRNS_7SessionEDpOT_]+0x59): undefined reference to `cpr::Session::SetOption(cpr::Url const&)'
    cprtrial.cpp:(.text._ZN3cpr4priv10set_optionIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEEvRNS_7SessionEDpOT_[_ZN3cpr4priv10set_optionIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEEvRNS_7SessionEDpOT_]+0x7e): undefined reference to `cpr::Session::SetOption(cpr::Authentication const&)'
    cprtrial.cpp:(.text._ZN3cpr4priv10set_optionIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEEvRNS_7SessionEDpOT_[_ZN3cpr4priv10set_optionIJNS_3UrlENS_14AuthenticationENS_10ParametersEEEEvRNS_7SessionEDpOT_]+0xa3): undefined reference to `cpr::Session::SetOption(cpr::Parameters&&)'
    /tmp/ccEYLUY6.o: In function `std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, cpr::CaseInsensitiveCompare, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
    cprtrial.cpp:(.text._ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_]+0x8f): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
    cprtrial.cpp:(.text._ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_]+0x114): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
    cprtrial.cpp:(.text._ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_]+0x1ae): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
    cprtrial.cpp:(.text._ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_]+0x255): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
    cprtrial.cpp:(.text._ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_]+0x2e6): undefined reference to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
    /tmp/ccEYLUY6.o:cprtrial.cpp:(.text._ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSG_PSt13_Rb_tree_nodeIS8_E[_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN3cpr22CaseInsensitiveCompareESaIS8_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSG_PSt13_Rb_tree_nodeIS8_E]+0x6c): more undefined references to `cpr::CaseInsensitiveCompare::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' follow
    collect2: error: ld returned 1 exit status
    

    I'm not sure if this a problem with the way I Installed cpr or something related to my system. I'm running this on a Ubuntu 18.04 Docker container.

    Build :construction_worker: Enhancement :ok_hand: 
    opened by RKolla99 8
Releases(1.8.3)
  • 1.8.3(May 5, 2022)

    This release disables setting SSL-Key blobs for older versions of curl below 7.71.0, since it was not available previously to that. More information on that can be found here: https://github.com/libcpr/cpr/issues/732

    Full Changelog: https://github.com/libcpr/cpr/compare/1.8.2...1.8.3

    Source code(tar.gz)
    Source code(zip)
  • 1.8.2(Apr 27, 2022)

    What's Changed

    • Downgraded curl to 1.80.0 to fix #709 and #732 by @COM8 in https://github.com/libcpr/cpr/pull/733

    Full Changelog: https://github.com/libcpr/cpr/compare/1.8.1...1.8.2

    Source code(tar.gz)
    Source code(zip)
  • 1.8.1(Mar 25, 2022)

  • 1.8.0(Mar 25, 2022)

    Changes

    • Added DownloadAsync(...) #696
    • Added basic range support via SetRange(...) #701
    • Added support for setting the private key blob directly #699
    • Added Mbed TLS support #714
    • Added an option to reserve space before downloading the response string #712
    • Updated the build in curl to 7.81.0
    • Fixed CA-Path for Android #707
    • Fix overwriting of ca bundle #717
    • Fix build with OpenSSL on Ubuntu bionic #696
    • Fixed installing DLLs to binary directory
    Source code(tar.gz)
    Source code(zip)
  • 1.7.2(Dec 9, 2021)

  • 1.7.1(Dec 9, 2021)

    Small bug fix release.

    Changes

    • Fixed setting headers when calling cpr::Session::Download(...).

    Now something like this should work:

    cpr::Url url{server->GetBaseUrl() + "/download_gzip.html"};
    cpr::Session session;
    session.SetUrl(url);
    session.SetHeader(cpr::Header{{"Accept-Encoding", "gzip"}}); // Works now
    cpr::Response response = session.Download(cpr::WriteCallback{write_data, 0});
    
    Source code(tar.gz)
    Source code(zip)
  • 1.7.0(Nov 24, 2021)

    • Added a Cppcheck CI run
    • Fixed automated libcurl ca path detection
    • Fixed missing raw_header in cpr::Response
    • Fixed bugprone narrowing conversions
    • Fixed MaxRedirects exceeded should be treated as error
    • Updated libcurl from 7.75.0 to 7.79.1
    • Fixed cprConfig.cmake when building cpr as a submodule
    • Added cpr version macros in cprver.h
    • Fixed CMake paths for subprojects
    • Updated zlib-ng from 2.0.0-RC2 to 2.0.5
    • Fixed usage of CPR_USE_SYSTEM_GTEST
    • Added CMake find-package support
    • Added more redirect options:
      • cont_send_cred: Continue to send authentication (user+password) credentials when following locations, even when hostname changed.
    • Added an option to specify the HTML version with SetHttpVersion(...)
    • Fixed respecting system proxy configuration
    • Added an option to select the outgoing interface with SetInterface(...)
    • Added an option to get the file download length GetDownloadFileLength(...)
    • Updated Google Tests from 1.10.0 to 1.11.0
    • Added proxy authentication
    • Don't forcibly override user setting for FETCHCONTENT_QUIET
    Source code(tar.gz)
    Source code(zip)
  • 1.6.2(Apr 27, 2021)

  • 1.6.1(Apr 27, 2021)

    Minor feature and bugfix release with the following changes:

    • Added MacOS darwin-ssl support #549
    • Added an option to split a request preparation from its execution #533
    • cpr::Session is now movable #544
    • Not overriding BUILD_TESTING as cache variable any more #561
    • Avoid recursive template instantiation in priv::set_option() #540
    • Do not move targets in to a bin if cpr is a sub project #531
    Source code(tar.gz)
    Source code(zip)
  • 1.6.0(Mar 19, 2021)

    In this release the CMake integration has been refactored to fix a bunch of SSL issues. During this change all relevant CMake variable names changed. Here are the new ones:

    -- =======================================================
    --   CPR_GENERATE_COVERAGE: OFF
    --   CPR_CURL_NOSIGNAL: OFF
    --   CPR_USE_SYSTEM_GTEST: OFF
    --   CPR_FORCE_USE_SYSTEM_CURL: OFF
    --   CPR_ENABLE_SSL: ON
    --   CPR_FORCE_OPENSSL_BACKEND: OFF
    --   CPR_FORCE_WINSSL_BACKEND: OFF
    --   CPR_BUILD_TESTS: ON
    --   CPR_BUILD_TESTS_SSL: ON
    -- =======================================================
    

    Documentation for those can be found here: https://github.com/whoshuu/cpr/blob/aac5058a15e9ad5ad393973dc6fe44d7614a7f55/CMakeLists.txt#L30-L40

    If neither CPR_FORCE_OPENSSL_BACKEND nore CPR_FORCE_WINSSL_BACKEND has been set to ON, CMake will try to automatically detect the best SSL backend for your system (WinSSL - Windows, OpenSSL - Linux & Mac, ...).

    How to build on Windows

    With WinSSL

    mkdir build
    cd build
    cmake .. -DCPR_BUILD_TESTS_SSL=OFF # SSL test are only supported with OpenSSL
    cmake --build .
    

    With OpenSSL

    mkdir build
    cd build
    cmake .. -DCPR_FORCE_OPENSSL_BACKEND=ON # Disable auto detect and force OpenSSL
    cmake --build .
    

    Changes

    • Added support for GCC10 static analysis
    • Added an option to retrieve the std::shared_ptr<CurlHolder> from a session
    • Added UpdateHeader(const Header& header) support #506
    • Added support for retrieving certificate information #453
    • Added urlDecode(std::string) for url decoding
    • Add BearerToken support #465
    • Explicit move operator for StringHolder
    • cpr::Session cleanup and allow the compiler to generate the needed constructor
    • Updated curl from 7.69.1 to 7.75.0 #529
    • Compatibility for libcurl <= 7.60
    • Less auto and more explicit types
    • Refactored the CMake variables #529
    • Change listening ports used for tests
    • Fixed AbstractServer data race
    • Fixed Windows OpenSSL builds #529
    • Fixed Windows SSL backend detection #529
    • Fixed ReadCallback will reset Header #517
    • Fixed the Windows OpenSSL CI build
    Source code(tar.gz)
    Source code(zip)
  • 1.5.2(Oct 20, 2020)

    This hotfix for v1.5.1 includes the following fixes:

    • Fixed: cpr::Post wrong content length (#450, #456, #458)
    • Fixed: Mutex for multithreaded access not being static
    • Fixed: No const rvalue references (#424)
    Source code(tar.gz)
    Source code(zip)
  • v1.5.1(Jul 8, 2020)

    Changes

    • CMake add ability to use WINSSL (#404)
    • Thread save access to libCurl (#313)
    • Allow implicit creation of cpr:Url, cpr:Body and cpr:UserAgent (#411)
    • Payload with string variables (#409)
    • Cleanup (#407, #408)
    Source code(tar.gz)
    Source code(zip)
  • 1.5.0(Jun 22, 2020)

    Changes

    • Updated CURL to curl-7_69_1 (#343)
    • Updated mongoose to 6.18
    • Updated googletest to release-1.10.0
    • Refactored the mongoose test server setup
    • Added SSL options (#276)
    • Fixed URL encoding (#379)
    • Fixed Windows std::min type deduction
    • GitHub Actions CI (#393)
    • Refactored all the CMake stuff (#383)
    • Fixed passing correct data type when setting CURLOPT_POSTFIELDSIZE_LARGE
    • Switched Body, UserAgent and Url from std::string derivation classes to string holder classes (#303)
    • General cleanup of the code base
    Source code(tar.gz)
    Source code(zip)
Owner
C++ Requests: Curl for People, a spiritual port of Python Requests.
null
JeVois-Pro People Counter : Implement people counter on JeVois-Pro Deep Learning Smart Camera

JeVois-Pro People Counter Refer to the OpenCV People Counter article to implement a people counter on the JeVois-Pro Deep Learning Smart Camera. First

On-Device AI Co., Ltd. 1 Nov 10, 2021
This is a simple version of Apex-Legends-SDK since so many people having struggles with python binding

This is a simple version of Apex-Legends-SDK since so many people having struggles with python binding

skidword64 27 May 17, 2022
Threat Emulation and Red Teaming Framework, The Hacking Software for normal people.

The Remote Hacker Probe is a Threat Emulation and Red Teaming Framework built to be easy to use. The Remote Hacker Probe is Feature Rich! Including, K

QuantumCored 139 May 8, 2022
A simple wrapper for 'pacman' with a syntax similar to 'apt' to help people transitioning to Arch and Arch based distributions like Manjaro.

aptpac aptpac is a program which helps with the transition to Arch Linux and Arch based distros like Manjaro. It simplifies using pacman as it works l

Itai Nelken 9 Feb 8, 2022
Off The Grid (OTG) Messenger is an easy way for people to communicate through text messages when in remote areas.

Off The Grid (OTG) Messenger is an easy way for people to communicate through text messages when in remote areas. With a theoretical transmission range of 10 miles (16kms), OTG messenger can be used by groups of people to stay connected when they are in areas not serviced by mobile connectivity.

Trevor Attema 479 Apr 28, 2022
The Xnoe Operating System, for people who want an OS that is useless.

Xnoe OS An attempt at writing an "Operating System" in x86 assembler. Hi all, I have many hobbies, one of those is torturing myself with knowledge I p

Xnoe 7 Apr 18, 2022
To turn on and off the pump, most people use a manual switch.

To turn on and off the pump, most people use a manual switch. As a result, people forget to switch off the pump from time to time, resulting in water overflow. They may forget to switch on the motor at times, resulting in a water problem later on. It also wastes a lot of electricity. To solve this problem, we need a smart device to control the pump.

Md. Asad Chowdhury Dipu 1 Oct 14, 2021
ClickLock which supports old games where the Windows ClickLock fails to work. This is a charity project, designed for people with disabilities.

Mouse ClickLock For Games This small utility works in a similar way as ClickLock available on Windows, but also supports old games where the normal Cl

null 3 Nov 1, 2021
🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.

?? ImHex A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM. Supporting If you like my work, plea

WerWolv 12.7k May 15, 2022
A repo for helping people get started with Competitive Programming and Data Structures & Algorithms

Hack CP DSA Update regarding hacktoberfest: please refer this announcement Wanna improve your problem solving skills ❓ Wanna practice collaborating on

TLE MEC 169 May 3, 2022
Remote hacker probe - Threat Emulation and Red Teaming Framework, The Hacking Software for normal people.

The Remote Hacker Probe is a Threat Emulation and Red Teaming Framework built to be easy to use. The Remote Hacker Probe is Feature Rich! Including, K

Fahad 139 May 8, 2022
Software to support people learning OpenMP with our book

Software to support people learning OpenMP with our book ... The OpenMP Common Core: Making OpenMP Simple Again

Tim Mattson 39 May 4, 2022
Bank of challenges & solutions from r/dailyprogrammer for people learning to program

DailyProgrammerChallenges This repo contains all of the challenges from r/dailyprogrammer and also scripts used to pull challenges from the subreddit

Freddie Vargus 313 Apr 1, 2022
An Xposed module to detect or reject applist requests

Hide My Applist About this module Although "It is incorrect to detect specific app's installation", yet not every app using root provides random packa

null 783 May 14, 2022
Register for Hacktoberfest and make four pull requests (PRs) between October 1st-31st to grab free SWAGS

⭐️ Projects and Codes ⭐️ This is beginner friendly repo. We aim for beginners to start with their first contributions to open-source. If you are looki

Joel Sunny Varghese 9 Jan 6, 2022
You may learn how to make successful pull requests and get your first valid open source contribution by using this repository.

Your-First-Contribution You may learn how to make successful pull requests and get your first valid open source contribution by using this repository.

Veshraj Ghimire 23 Apr 21, 2022
Helping everyone to code and creating pull requests

Novice Coding It's an initiative to help create more awareness about Open Source and help introduce many more students to the benefits of FOSS. We wil

Saptarshi Sarkar 18 May 4, 2022
all valid pull requests accepted!!

Hacktoberfest_2021 Hacktober Fest Details Important Notice The repository has been marked as "Excluded Project" by Hacktoberfest Algorithm. I have no

Gautam Jain 23 Mar 21, 2022
Lua HTTP async client using libcurl (supports multi requests in parallel)

lua-async-http lua-async-http rock, is a new lua rock written in C and based on libcurl. It allow us to make multiple http/https (with client certific

International Business Machines 3 Jan 30, 2022