requests 0.0.7

http requests


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

dlang-requests

http requests library

Build Status

Usage example:

 auto rq = Request();
 auto rs = rq.get("http://httpbin.org/");
 writeln(rs.responseBody.data!string);

 rq.keepAlive = 5;
 rs = rq.post("http://httpbin.org/post", `{"a":"b", "c":[1,2,3]}`, "application/json");
 assert(rs.code==200);

 auto f = File("tests/test.txt", "rb");
 rs = rq.post("http://httpbin.org/post", f.byChunk(3), "application/octet-stream");
 assert(rs.code==200);
 auto data = parseJSON(rs.responseBody.data).object["data"].str;
 assert(data=="abcdefgh\n12345678\n");
 f.close();

Authors:
  • ikod
Dependencies:
none
Versions:
2.0.9 2022-Oct-22
2.0.8 2022-May-15
2.0.7 2022-May-09
2.0.6 2022-Apr-27
2.0.5 2022-Apr-23
Show all 83 versions
Download Stats:
  • 67 downloads today

  • 590 downloads this week

  • 6963 downloads this month

  • 217239 downloads total

Score:
4.8
Short URL:
requests.dub.pm