HTTP clients
| HTTP request | |
| Status code | |
| Response body | |
| Options and timeout |
HTTP request
The httpc module sends a request and returns a response record. The third element of the record is the status code, and the fourth is the body as a binary.
1> {ok, #response{status = Status, body = Body}} = httpc:get("http://example.com", []).
ok
Status
200
Body
<<"...">>
Next: io:format and output
Article author: Arthur Isaev