You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Boa tarde Lorn! Preciso tirar uma dúvida com vc em relação ao módulo LWP::Curl. Será que vc pode me ajudar?
A pergunta é simples. Como eu poderia fazer autenticação usando o LWP::Curl?
4:34
You have connected
5:10
Lindolfo 'Lorn' Rodrigues
opa
tá aí?
eu não tava aqui
5:11
Andre Carneiro
opa, no cricket!
Eu fiz a autenticação direto usando o agent que tem no objeto do LWP::Curl, que é um objeto WWW::Curl::Easy.
5:11
Lindolfo 'Lorn' Rodrigues
eu confesso que nunca fiz, mas auth padrão http deve funcionar vc já tentou http://usuario:[email protected] ?
blz!
5:12
Andre Carneiro
Tem que passar o auth:BASIC tb...
5:12
Lindolfo 'Lorn' Rodrigues
ah tá
meu modulo é muito mais usado do que eu pensei
5:13
Andre Carneiro
Seria interessante ter algo parecido com o método credentials do LWP::UserAgent ??
5:13
Lindolfo 'Lorn' Rodrigues
na verdade eu vou copiar a ideia do mechanize, que é assim:
my $agent = WWW::Mechanize->new();
$agent->default_header(
Authorization => "Basic " .
MIME::Base64::encode( 'usuario' . 'senha') );
pow, vou colocar como feature agora no github, vou ver se pego no fds
5:14
Andre Carneiro
Ah sim... já facilita pra caramba...
Boa tarde Lorn! Preciso tirar uma dúvida com vc em relação ao módulo LWP::Curl. Será que vc pode me ajudar?
A pergunta é simples. Como eu poderia fazer autenticação usando o LWP::Curl?
4:34
You have connected
5:10
Lindolfo 'Lorn' Rodrigues
opa
tá aí?
eu não tava aqui
5:11
Andre Carneiro
opa, no cricket!
Eu fiz a autenticação direto usando o agent que tem no objeto do LWP::Curl, que é um objeto WWW::Curl::Easy.
5:11
Lindolfo 'Lorn' Rodrigues
eu confesso que nunca fiz, mas auth padrão http deve funcionar vc já tentou http://usuario:[email protected] ?
blz!
5:12
Andre Carneiro
Tem que passar o auth:BASIC tb...
5:12
Lindolfo 'Lorn' Rodrigues
ah tá
meu modulo é muito mais usado do que eu pensei
5:13
Andre Carneiro
Seria interessante ter algo parecido com o método credentials do LWP::UserAgent ??
5:13
Lindolfo 'Lorn' Rodrigues
na verdade eu vou copiar a ideia do mechanize, que é assim:
my $agent = WWW::Mechanize->new();
$agent->default_header(
Authorization => "Basic " .
MIME::Base64::encode( 'usuario' . 'senha') );
pow, vou colocar como feature agora no github, vou ver se pego no fds
5:14
Andre Carneiro
Ah sim... já facilita pra caramba...
my $lwpcurl = LWP::Curl->new();
my $curl = $lwpcurl->{agent};
$curl->setopt(CURLOPT_URL,'http://restful.painel.localhost/index.php/Restful/AddTransactionalCampaign/');
$curl->setopt(CURLOPT_USERPWD, "interNalDataInf:keo+9e_21");
$curl->setopt(CURLOPT_POST, 1);
$curl->setopt(CURLOPT_POSTFIELDS, 'auth=BASIC&message=NICE!');
The text was updated successfully, but these errors were encountered: