If a key or value stored in the body as form params contains special characters, they are escaped, encoded or something else to make that data compatible with content type application/x-www-form-urlencoded.
Actual Behavior
Characters like '&', '+', or '=' may cause unexpected behavior or errors.
Mention any other details that might be useful
The problem is in AspNetCoreWire:
body =
new BytesOf(
new Yaapii.Atoms.Text.Joined("&",
new MappedDictionary<string>((key, value) =>
$"{key}={value()}",
formParams
)
)
);
There has to be a better way of doing this.
Using System.Net.Http.FormUrlEncodedContent instead of System.Net.Http.ByteArrayContentmay solve this.
Expected Behavior
If a key or value stored in the body as form params contains special characters, they are escaped, encoded or something else to make that data compatible with content type application/x-www-form-urlencoded.
Actual Behavior
Characters like '&', '+', or '=' may cause unexpected behavior or errors.
Mention any other details that might be useful
The problem is in
AspNetCoreWire
:There has to be a better way of doing this. Using
System.Net.Http.FormUrlEncodedContent
instead ofSystem.Net.Http.ByteArrayContent
may solve this.Steps to reproduce the behavior
The log given by the failure.