Snippet #5 - Lowercase URI's and trailing slashes
Here's a couple rapid-fire snippets to help you manipulate HTTP request URI's. The first converts all characters in a URI to lowercase before submitting the request to the backend server. Node.js (and javascript) provide some very helpful string manipulation methods -
toLowerCase()
is one. In the second snippet, we're using a simple regex check and string concatenation to ensure that any URI has a trailing forward slash before being passed to the backend server.
Updated Jun 05, 2023
Version 2.0Brian_Talley_15
Historic F5 Account
Joined May 04, 2019
No CommentsBe the first to comment