native C/C++ single header for Win/Unix implementation for http/s connections
- example :
nativeHTTP::Request req;
std::string myip = req.sendReq(L"https://www.myexternalip.com/raw").response;
std::cout << "my ip is :" << myip << "\n";
- example on json post :
std::string JsonData = "{\"ab\":10}";
req.sendReq(L"https://ptsv2.com/t/66j3d-1668215687/post", "POST", "{\"ab\":10}");
/* json post ab = 10 - test room:https://ptsv2.com/t/66j3d-1668215687/d/4687238942162944 */
- POST other methods ?
if wanna application/x-www-form-urlencoded, multipart/form-data, or text/plain..etc edit line nativehttp:258 - HTTP/S mode ?
to connect through http instead of https remove the SECURE flag defined in or use NULL instead nativehttp:217
#next
*add cookies support
*add full support unicode
*add file upload post data with easy usage (mutipart file upload .. etc)
*add switch btw json post and other post requests
*add winhttp support
*add unix support