I’m developing an application using flutter
I want to pass an http request in post and I need the space to be replaced by the + character.
However, when I make the change myself, I get the impression that the package automatically encodes the + in url format, which is not suitable for the server I’m requesting from.
I tried to encode the text myself at the last moment.
So when the user submits ‘hello world’, I want the body of the post request to be ‘hello+world’ and not ‘hello%2Bworld’.
Thanks in advance for your answers
Here is the content of the request I want :
POST /XXXX/XXXX/XXXX HTTP/2
Host: www.example.com
Content-Length: 22
Cache-Control: max-age=0
Sec-Ch-Ua: “Chromium”;v=”127″, “Not)A;Brand”;v=”99″
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: “Windows”
Accept-Language: fr-FR
Upgrade-Insecure-Requests: 1
Origin: https://www.example.com
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.100 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Referer: https://www.example.com/XXXX/XXXX/XXXX
Accept-Encoding: gzip, deflate, br
Priority: u=0, i
searchword=hello+world
1