Skip to content

Commit

Permalink
fix: set request() path to lowercase (#146)
Browse files Browse the repository at this point in the history
Always sets request() method argument method to lower case to allow requests like:
vehicle.request("GET", "odometer")

Test Plan: use getting-started-app to test uppercase method names as arguments.

* fix: set request() path to lowercase

* Use toLowerCase instead of toLocaleLowercase
  • Loading branch information
naomiperez authored Feb 3, 2022
1 parent d3a8a67 commit 02879ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/.template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Smartcar Node SDK documentation.
{{/if}}
{{/indexChildren}}

{{>main}}
{{>main}}
2 changes: 1 addition & 1 deletion lib/vehicle.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Vehicle.prototype.request = async function(
}

const rawResponse = await new SmartcarService(options).request(
method,
method.toLowerCase(),
path,
{body}
);
Expand Down

0 comments on commit 02879ae

Please sign in to comment.