https://github.com/perrywerneck/libudjathttp
HTTP Client library and protocol handler for UDJAT.
https://github.com/perrywerneck/libudjathttp
Last synced: 2 months ago
JSON representation
HTTP Client library and protocol handler for UDJAT.
- Host: GitHub
- URL: https://github.com/perrywerneck/libudjathttp
- Owner: PerryWerneck
- License: gpl-3.0
- Created: 2021-12-22T01:56:08.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-04T21:18:41.000Z (3 months ago)
- Last Synced: 2025-02-04T22:23:40.715Z (3 months ago)
- Language: C++
- Homepage:
- Size: 375 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# HTTP Client library for UDJAT.
Windows/Linux http client library module for libudjat based applications.
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://build.opensuse.org/package/show/home:PerryWerneck:udjat/libudjathttp)## Installation
# Sample use
## As a library
### Authenticated get
```C++
cout <<
HTTP::Client("http://localhost/sample")
.setCredentials("userid","passwd")
.get()
<< endl;
```### Post with variable parsing
This post expands ${} values with network info extracted from the active connection.
```C++
HTTP::Client("http://localhost").post(
"ipaddr='${ipaddr}'\n"
"hostip='${hostip}'\n"
"nic='${network-interface}'\n"
"macaddress='${macaddress}'"
);
```### Save to file
```C++
HTTP::Client("http://localhost").save("test.html")
```