You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The last path segment gets trimmed from custom api endpoint urls.
If setting global: { url: 'https://example.com/test/url/is/long/' }, the url that is fetched for prerecorded transcribe is https://example.com/test/url/is/v1/listen (note the last segment removed).
This was unexpected!
For context, I am building a mock endpoint for our test suites.
Hmm thinking more about this. We're trying to normalise the URL string for when we add it to the object. Is there a reason you need the trailing slash at all?
What is the current behavior?
The last path segment gets trimmed from custom api endpoint urls.
If setting
global: { url: 'https://example.com/test/url/is/long/' }
, the url that is fetched for prerecorded transcribe ishttps://example.com/test/url/is/v1/listen
(note the last segment removed).This was unexpected!
For context, I am building a mock endpoint for our test suites.
Steps to reproduce
Output is:
Expected behavior
I would expect the last segment of the url to be preserved.
Please tell us about your environment
Other information
Looks like the trailing slash is trimmed in Interested in a PR that preserves the trailing slash here?
deepgram-js-sdk/src/packages/AbstractClient.ts
Line 81 in bd51da7
A hacky workaround is to add a double slash at the end.
The text was updated successfully, but these errors were encountered: