Skip to content

Commit

Permalink
fix: http request
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-lemon committed Aug 19, 2019
1 parent baadcde commit 1ed62fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/http-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ const maker: EnginePluginBuilder<HttpProxy> = (_$, name, options) => {
const url =
ENDPOINT +
(TYPE === undefined ? '' : '/' + encodeURIComponent(TYPE)) +
(ID === undefined ? '' : '/' + encodeURIComponent(ID)) +
(CMD === undefined ? '' : '/' + encodeURIComponent(CMD)) +
(TYPE === undefined || ID === undefined ? '' : '/' + encodeURIComponent(ID)) +
(TYPE === undefined || ID === undefined || CMD === undefined ? '' : '/' + encodeURI(CMD)) + //NOTE - cmd could have additional '/' char.
(!query_string ? '' : '?' + query_string);
const request = REQUEST;
const options: any = {
Expand Down

0 comments on commit 1ed62fb

Please sign in to comment.