How to use GetConnect post with application/x-www-form-urlencoded #1008
-
I'm tring to use GetConnect, but I can't make a post with application/x-www-form-urlencoded `final url = 'http://someurl';
|
Beta Was this translation helpful? Give feedback.
Answered by
eduardoflorence
Jan 13, 2021
Replies: 2 comments 3 replies
-
Hi, @Dufayel you should do this: final url = 'http://someurl';
final body = 'user=xpto&pass=xpto';
final headers = {"Accept": "application/json"};
final response= await post(
url,
body,
contentType: 'application/x-www-form-urlencoded',
headers: headers
); |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Dufayel
-
The above works well, but how about if one wants to send special characters like '+'? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, @Dufayel you should do this: