-
Notifications
You must be signed in to change notification settings - Fork 28
The new HttpClient
Brian Zou edited this page May 27, 2020
·
1 revision
Hunt HttpClient is a tool library for sending HTTP requests to Web service communications. provides a very good development experience for developers.
import hunt.httpclient;
void main()
{
string content = Http.get("http://api.example.com/user/1").content();
writeln(content);
}
import hunt.httpclient;
void main()
{
auto response = Http.post("http://api.example.com/auto",
["username": "admin", "password": "hunt@@2020"]);
string content = response.content();
writeln(content);
}