Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit a675f20

Browse files
committed
Use getEndpointUrl to automatically encode stream urls.
1 parent 0e4111e commit a675f20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rest/StreamEndpoints.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export async function createStream(props) {
7676
props,
7777
})
7878
const json = await authFetch(
79-
`${this.options.restUrl}/streams`,
79+
getEndpointUrl(this.options.restUrl, 'streams'),
8080
this.session,
8181
{
8282
method: 'POST',
@@ -187,7 +187,7 @@ export async function publishHttp(streamObjectOrId, data, requestOptions = {}, k
187187

188188
// Send data to the stream
189189
return authFetch(
190-
`${this.options.restUrl}/streams/${encodeURIComponent(streamId)}/data`,
190+
getEndpointUrl(this.options.restUrl, 'streams', streamId, 'data'),
191191
this.session,
192192
{
193193
...requestOptions,

0 commit comments

Comments
 (0)