Skip to content

Commit

Permalink
fix responseURL case
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbsgilbs committed Oct 22, 2020
1 parent 228ca2b commit 95d2aeb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/handle_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function makeResponse(result, config) {
headers: result[2],
config: config,
request: {
responseUrl: config.url,
responseURL: config.url,
},
};
}
Expand Down
4 changes: 2 additions & 2 deletions test/basics.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -823,15 +823,15 @@ describe("MockAdapter basics", function () {
});
});

it("returns the original request url in the response.request.responseUrl property", function () {
it("returns the original request url in the response.request.responseURL property", function () {
mock.onGet("/foo").reply(200, {
foo: "bar",
});

return instance.get("/foo").then(function (response) {
expect(response.status).to.equal(200);
expect(response.data.foo).to.equal("bar");
expect(response.request.responseUrl).to.equal("/foo");
expect(response.request.responseURL).to.equal("/foo");
});
});

Expand Down

0 comments on commit 95d2aeb

Please sign in to comment.