mindsphere / mindconnect-nodejs

NodeJS Library for Industrial IoT Connectivity - TypeScript SDK for Industrial IoT - Command Line Interface - Development Proxy - typescript-sdk is waiting for your contributions!
https://developer.siemens.com/industrial-iot-open-source/index.html
MIT License
68 stars 23 forks source link

chore: implement trailing slash check in Http Actions #356

Closed sn0wcat closed 4 months ago

sn0wcat commented 5 months ago

we could add in the implementations of HttpAction a check which just removes the trailing slash if there is one.

https://github.com/mindsphere/mindconnect-nodejs/blob/bca21837551535b20fac5632bca247841e9ca59d/src/api/frontend-auth.ts#L112

https://github.com/mindsphere/mindconnect-nodejs/blob/bca21837551535b20fac5632bca247841e9ca59d/src/api/browser-auth.ts#L155

url.replace(/\/$/, '')

Originally posted by @sn0wcat in https://github.com/mindsphere/mindconnect-nodejs/discussions/355#discussioncomment-9531854