Hi,

thanks for all your help :)

but what i didnt want to do is something like this:

my $response =
$ua->get("http://search.cpan.org/search?query=$query&query2=$query2etc";);

because this only works for http-get.
Isnt it possible to create a header that works with get and post?

Greetings,

Tobias

----- Original Message ----- 
From: "Sara" <[EMAIL PROTECTED]>
To: "Tobias Fink" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, November 06, 2003 10:07 AM
Subject: Re: HTTP::Request


> #!/usr/bin/perl
> use CGI;
> use LWP::UserAgent;
>
> my $q = new CGI;
>
> my $query = $q->param('query') || 'LWP';
>
> use LWP::UserAgent;
>
> my $ua = LWP::UserAgent->new;
>
> my $response = $ua->get("http://search.cpan.org/search?query=$query";);
>
> if ($response->is_success) {
>
> my $server_response = $response->content;
>
> print $server_response;
>
> }
>
>
>
>
>
> ----- Original Message -----
> From: "Tobias Fink" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, November 07, 2003 4:12 AM
> Subject: HTTP::Request
>
>
> > Hi,
> >
> > why doesn't
> >
> > my $ua = LWP::UserAgent->new;
> > my $res = $ua->request(GET 'http://www.google.de/search', q  =>
'asdasd');
> > if ($res->is_success) {
> >  my  $server_response = $res->content;
> >  print $server_response;
> > }
> >
> > print the html-source of http://www.google.de/search?q=asdasd ?
> >
> >
> > Regards,
> >
> > Tobias
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to