Skip to content

Code for Linux,Http client which can send GET/POST requests

License

Notifications You must be signed in to change notification settings

iceCreeam/HttpClient

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HttpClient

Usage: add header as "HttpClient.h"

Declare: HttpClient httpclient;

You need to add http-RequestHeaders as yourselves: httpclient.AddRequestHeader("Content-Type","application/x-www-form-urlencoded");

Simply use a string URL to GET: string Url = "http://tjservice.cn/campus"; string result = httpclient.GetUrl(Url);

Use a map to POST data to URL: Url = "http://tjservice.cn/build"; map<string, string> data; data["campus"] = "1"; result=httpclient.PostUrl(Url,data);

Use clear to reuse a HttpClient: httpclient.clear();

About

Code for Linux,Http client which can send GET/POST requests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.0%
  • Makefile 2.0%