mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-14 19:03:30 +00:00
Fix #357
This commit is contained in:
1 parent
6cde600922
commit
797d1f27e8
4 files changed
+693
-551
No files matched your search
@@ -287,7 +287,6 @@ Client Example
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// IMPORTANT: 1st parameter must be a hostname or an IP address string.
|
||||
httplib::Client cli("localhost", 1234);
|
||||
|
||||
auto res = cli.Get("/hi");
|
||||
@@ -297,6 +296,16 @@ int main(void)
|
||||
}
|
||||
```
|
||||
|
||||
NOTE: Constructor with scheme-host-port string is now supported!
|
||||
|
||||
```c++
|
||||
httplib::Client cli("localhost");
|
||||
httplib::Client cli("localhost:8080");
|
||||
httplib::Client cli("http://localhost");
|
||||
httplib::Client cli("http://localhost:8080");
|
||||
httplib::Client cli("https://localhost");
|
||||
```
|
||||
|
||||
### GET with HTTP headers
|
||||
|
||||
```c++
|
||||
|
||||
Reference in new issue
Block a user