'How to test a negative scenario with a space in the path of rest API endpoint?

I am testing a negative scenario where the application_Id = " ". So that my path of the endpoint would look like: "https://restAPIEndpoint.com/applicationId/ /restOfEndpoint"

But upon executing the scenario in BDD framework I am getting an error that says an illegal character at {index} of the path. How do I test that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source