Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janwolzenburg/httpsrequests
This library is for simple HTTP or HTTPS requests.
https://github.com/janwolzenburg/httpsrequests
api curl http https libcurl request
Last synced: 23 days ago
JSON representation
This library is for simple HTTP or HTTPS requests.
- Host: GitHub
- URL: https://github.com/janwolzenburg/httpsrequests
- Owner: janwolzenburg
- License: mit
- Created: 2023-03-08T16:13:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-24T20:33:56.000Z (8 months ago)
- Last Synced: 2024-12-06T12:07:30.141Z (23 days ago)
- Topics: api, curl, http, https, libcurl, request
- Language: C++
- Homepage:
- Size: 10.5 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# httpsRequest
Simple library for HTTP/HTTPS requests with GET or POST method based on libcurl.# Prerequisits
## CURL
To use this library you need the curl library. You can build it yourself or download a package.
You will need to modify the CURL_DIR variable in the CMakeLists.txt. Its value must be the path to the downloaded or build curl package.# Usage
Construct a httpsRequest object. Its parameters a the URL, the header, data and SSL type.
## URL
The URL will not get processed in any way by the library. Only the GET data will be appended.
## Header
The custom header is given by a vector of strings ("key: value").
## Data
Data is either a string which will perform a POST request with the given string as data. When a vector of 2-element string array is given a GET request is performed. Each element of the vector will be appended to the URL.
## SSL Type
Type of SSL. Available types are NONE, VERIFY_PEER, VERIFY_HOST and VERIFY_PEER_HOST. SSL is not tested!# Examples
There are two examples available. One with a simple request. And another one which requests JSON content with JSON content.