mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
Added client.
This commit is contained in:
parent
ced9c38339
commit
762e7938fd
9 changed files with 451 additions and 143 deletions
28
example/client.cc
Normal file
28
example/client.cc
Normal file
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// client.cc
|
||||
//
|
||||
// Copyright (c) 2012 Yuji Hirose. All rights reserved.
|
||||
// The Boost Software License 1.0
|
||||
//
|
||||
|
||||
#include <httplib.h>
|
||||
#include <cstdio>
|
||||
#include <signal.h>
|
||||
|
||||
using namespace httplib;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
using namespace httplib;
|
||||
|
||||
const char* hi = "/hi";
|
||||
|
||||
Client cli("localhost", 1234);
|
||||
|
||||
Response res;
|
||||
cli.get(hi, res);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// vim: et ts=4 sw=4 cin cino={1s ff=unix
|
Loading…
Add table
Add a link
Reference in a new issue