Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make login validation on Website using this plugin? #42

Closed
ZotInfo opened this issue Aug 25, 2020 · 1 comment
Closed

How to make login validation on Website using this plugin? #42

ZotInfo opened this issue Aug 25, 2020 · 1 comment

Comments

@ZotInfo
Copy link

ZotInfo commented Aug 25, 2020

I need to send the username and password and submit with the login button of the website itself, after doing this I need to browse some pages to collect the user information, how can I do this with this plugin?

I'm trying this, but not working 👍

class ImportCEI {

String urlLoginCEI = "https://cei.b3.com.br/CEI_Responsivo/login.aspx";

Future conectarCEI() async {
try {
var r = await Requests.post(
urlLoginCEI,
body: {
'ctl00$ContentPlaceHolder1$txtLogin': 'xxxx',
'ctl00$ContentPlaceHolder1$txtSenha': 'xxxx',
'ctl00$ContentPlaceHolder1$btnLogar': 'submit',
},
queryParameters: {
'ctl00$ContentPlaceHolder1$txtLogin': 'xxxx',
'ctl00$ContentPlaceHolder1$txtSenha': 'xxxx',
'ctl00$ContentPlaceHolder1$btnLogar': 'submit',
},
verify: false,
bodyEncoding: RequestBodyEncoding.FormURLEncoded);

  print("\n\n Retorno: ${r.content()} \n\n");
  r.raiseForStatus();
  dynamic json = r.json();
  print(json);
} catch(e) {
  print("\n conectarCEI Exception: $e ");
}

}
}

@sehnryr
Copy link
Collaborator

sehnryr commented Mar 23, 2022

This issue is not a bug report nor a feature request so I am closing it.

Please ask your question on Stack Overflow and make sure that your question is tagged with the dart-requests tag when asking it on Stack Overflow, to ensure that it is answered accurately.

@sehnryr sehnryr closed this as completed Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants