Skip to content

Commit

Permalink
Revert "Use URLSearchParams() to construct query strings"
Browse files Browse the repository at this point in the history
  • Loading branch information
manics authored Oct 2, 2023
1 parent d3078d3 commit 017e8c8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions js/packages/binderhub-client/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@ export class BinderRepository {
* Call the BinderHub API
*/
fetch() {
let apiUrl = new URL(this.baseUrl + "build/" + this.providerSpec);
let params = new URLSearchParams();
let apiUrl = this.baseUrl + "build/" + this.providerSpec;
if (this.buildToken) {
params.append('build_token', this.buildToken);
apiUrl = apiUrl + `?build_token=${this.buildToken}`;
}

apiUrl.search = params.toString();

this.eventSource = new EventSource(apiUrl);
this.eventSource.onerror = (err) => {
console.error("Failed to construct event stream", err);
Expand Down

0 comments on commit 017e8c8

Please sign in to comment.