1
0
mirror of synced 2025-07-29 11:01:13 +03:00

Refactoring. Removed some client methods.

This commit is contained in:
yhirose
2012-10-05 13:58:56 -04:00
parent 3c8c835489
commit 6062ea592b
5 changed files with 145 additions and 197 deletions

View File

@ -1,20 +1,23 @@
cpp-httplib
===========
A C++ HTTP library.
A C++11 header-only HTTP library.
[The Boost Software License 1.0](http://www.boost.org/LICENSE_1_0.txt)
It's extremely easy to setup. Just include **httplib.h** file in your code!
Server Example
--------------
Inspired by [Sinatra](http://www.sinatrarb.com/)
#include <httplib.h>
using namespace httplib;
int main(void)
{
using namespace httplib;
Server svr("localhost", 1234);
svr.get("/hi", [](Connection& c) {
@ -29,11 +32,10 @@ Client Example
#include <httplib.h>
#include <iostream>
using namespace httplib;
int main(void)
{
Client cli("localhost", 1234);
httplib::Client cli("localhost", 1234);
auto res = cli.get("/hi");
if (res && res->status == 200) {