This step definition is used to send an HTTP request with form data (URL-encoded) in the request body. It’s typically used for login forms or APIs that expect application/x-www-form-urlencoded data instead of JSON.
When (?:I )?send a ([A-Z]+) request to "([^"]+)" with form data:$
Sends a request using the method (POST, PUT, etc.) with key–value pairs formatted as form data.
Example:
When I send a POST request to "/login" with form data:
"""
username=admin
password=secret
remember=true
"""