Skip to content

How to use GetConnect post with application/x-www-form-urlencoded #1008

Answered by eduardoflorence
Dufayel asked this question in Q&A
Discussion options

You must be logged in to vote

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
);

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@Dufayel
Comment options

@oleksii-pimenov
Comment options

@rifkiandriyanto
Comment options

Answer selected by Dufayel
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants