1
0
mirror of synced 2025-07-29 11:01:13 +03:00
This commit is contained in:
yhirose
2020-07-29 22:59:26 -04:00
parent 6cde600922
commit 797d1f27e8
4 changed files with 693 additions and 551 deletions

View File

@ -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++