Skip to content

Commit

Permalink
ldc2 0.17 workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
ikod committed May 1, 2016
1 parent 07afc02 commit 7eacfaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/requests/http.d
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ public unittest {
assert(rs.responseBody.length > 0);
rs = Request().get("http://httpbin.org/get", ["c":" d", "a":"b"]);
assert(rs.code == 200);
auto json = parseJSON(rs.responseBody).object["args"].object;
auto json = parseJSON(rs.responseBody.data).object["args"].object;
assert(json["c"].str == " d");
assert(json["a"].str == "b");

Expand All @@ -1165,7 +1165,7 @@ public unittest {
info("Check POST json");
rs = rq.post("http://httpbin.org/post", `{"a":"☺ ", "c":[1,2,3]}`, "application/json");
assert(rs.code==200);
json = parseJSON(rs.responseBody).object["json"].object;
json = parseJSON(rs.responseBody.data).object["json"].object;
assert(json["a"].str == "");
assert(json["c"].array.map!(a=>a.integer).array == [1,2,3]);
{
Expand All @@ -1184,7 +1184,7 @@ public unittest {
info("Check POST utf8 string");
rs = rq.post("http://httpbin.org/post", "привiт, свiт!", "application/octet-stream");
assert(rs.code==200);
auto data = parseJSON(rs.responseBody).object["data"].str;
auto data = parseJSON(rs.responseBody.data).object["data"].str;
assert(data=="привiт, свiт!");
}
// ranges
Expand Down

0 comments on commit 7eacfaf

Please sign in to comment.