diff --git a/src/rest/StreamEndpoints.js b/src/rest/StreamEndpoints.js index 39a9fec7f..700a94138 100644 --- a/src/rest/StreamEndpoints.js +++ b/src/rest/StreamEndpoints.js @@ -76,7 +76,7 @@ export async function createStream(props) { props, }) const json = await authFetch( - `${this.options.restUrl}/streams`, + getEndpointUrl(this.options.restUrl, 'streams'), this.session, { method: 'POST', @@ -187,7 +187,7 @@ export async function publishHttp(streamObjectOrId, data, requestOptions = {}, k // Send data to the stream return authFetch( - `${this.options.restUrl}/streams/${streamId}/data`, + getEndpointUrl(this.options.restUrl, 'streams', streamId, 'data'), this.session, { ...requestOptions,