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

Commit 3133990

Browse files
authored
Merge pull request #184 from streamr-dev/add-encodeURIComponent-to-publish-http
escape forward slashes in streamId when calling publishHttp
2 parents 8e4ded6 + a675f20 commit 3133990

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/${streamId}/data`,
190+
getEndpointUrl(this.options.restUrl, 'streams', streamId, 'data'),
191191
this.session,
192192
{
193193
...requestOptions,

0 commit comments

Comments
 (0)