Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Help testing post response

Reply
Thread Tools

Help testing post response

 
 
Jim Simpson
Guest
Posts: n/a
 
      07-13-2004
I'm trying to test a post response as follows:
<<<<<<<<<<<<<<<
my $csvresponse = $ua->post($https_downmngrform, [ "$https_name1" =>
"$https_value2", "$https_name2" => "$https_value1", 'Download' => 'Download
Data' ] );
if ($csvresponse->is_success())
{
print "is_success" . ", " ;
}
<<<<<<<<<<<<<<<<
My problem is that it indicates success even though the result is not what I
want. It also indicates success when I substitute a nonsensical string for
one of the values. Can someone suggest what might be a problem.

Thanks,

Jim


 
Reply With Quote
 
 
 
 
Tad McClellan
Guest
Posts: n/a
 
      07-13-2004
Jim Simpson <(E-Mail Removed)> wrote:

> I'm trying to test a post response as follows:
><<<<<<<<<<<<<<<
> my $csvresponse = $ua->post($https_downmngrform, [ "$https_name1" =>

^ ^
^ ^
> "$https_value2", "$https_name2" => "$https_value1", 'Download' => 'Download

^ ^ ^ ^ ^ ^
^ ^ ^ ^ ^ ^
> Data' ] );



perldoc -q vars

What's wrong with always quoting "$vars"?


> if ($csvresponse->is_success())
> {
> print "is_success" . ", " ;
> }
><<<<<<<<<<<<<<<<
> My problem is that it indicates success even though the result is not what I
> want. It also indicates success when I substitute a nonsensical string for
> one of the values. Can someone suggest what might be a problem.



The resource you are talking to isn't playing nicely. (ie. it is broken)


--
Tad McClellan SGML consulting
http://www.velocityreviews.com/forums/(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
 
 
 
Jim Simpson
Guest
Posts: n/a
 
      07-14-2004
Tad,
I don't understand your response. Could you be a little more descriptive for
me?
Jim


"Tad McClellan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Jim Simpson <(E-Mail Removed)> wrote:
>
> > I'm trying to test a post response as follows:
> ><<<<<<<<<<<<<<<
> > my $csvresponse = $ua->post($https_downmngrform, [ "$https_name1" =>

> ^ ^
> ^ ^
> > "$https_value2", "$https_name2" => "$https_value1", 'Download' =>

'Download
> ^ ^ ^ ^ ^ ^
> ^ ^ ^ ^ ^ ^
> > Data' ] );

>
>
> perldoc -q vars
>
> What's wrong with always quoting "$vars"?
>
>
> > if ($csvresponse->is_success())
> > {
> > print "is_success" . ", " ;
> > }
> ><<<<<<<<<<<<<<<<
> > My problem is that it indicates success even though the result is not

what I
> > want. It also indicates success when I substitute a nonsensical string

for
> > one of the values. Can someone suggest what might be a problem.

>
>
> The resource you are talking to isn't playing nicely. (ie. it is broken)
>
>
> --
> Tad McClellan SGML consulting
> (E-Mail Removed) Perl programming
> Fort Worth, Texas



 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      07-14-2004

[ Please learn how to properly compose a followup posting.
Have you seen the Posting Guidelines that are posted here frequently?
Text rearranged into a more conventional order (ie. chronological).
]


Jim Simpson <(E-Mail Removed)> wrote:
> "Tad McClellan" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Jim Simpson <(E-Mail Removed)> wrote:
>>
>> > I'm trying to test a post response as follows:
>> ><<<<<<<<<<<<<<<
>> > my $csvresponse = $ua->post($https_downmngrform, [ "$https_name1" =>

>> ^ ^
>> ^ ^
>> > "$https_value2", "$https_name2" => "$https_value1", 'Download' =>

> 'Download
>> ^ ^ ^ ^ ^ ^
>> ^ ^ ^ ^ ^ ^
>> > Data' ] );

>>
>>
>> perldoc -q vars
>>
>> What's wrong with always quoting "$vars"?



You do not need any of those underlined quote characters:

my $csvresponse = $ua->post($https_downmngrform, [ $https_name1 =>
$https_value2, $https_name2 => $https_value1, ...


will work fine.

"perldoc -q" is how you look up a Perl Frequently Asked Question.


>> > It also indicates success when I substitute a nonsensical string

> for
>> > one of the values. Can someone suggest what might be a problem.

>>
>>
>> The resource you are talking to isn't playing nicely. (ie. it is broken)
>>

> I don't understand your response. Could you be a little more descriptive for
> me?



If the resource that you are communicating with reports success
when it failed, then it contains a bug, ie. it is broken.


--
Tad McClellan SGML consulting
(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
Jim Simpson
Guest
Posts: n/a
 
      07-15-2004

"Tad McClellan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> [ Please learn how to properly compose a followup posting.
> Have you seen the Posting Guidelines that are posted here frequently?
> Text rearranged into a more conventional order (ie. chronological).
> ]
>
>
> Jim Simpson <(E-Mail Removed)> wrote:
> > "Tad McClellan" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Jim Simpson <(E-Mail Removed)> wrote:
> >>
> >> > I'm trying to test a post response as follows:
> >> ><<<<<<<<<<<<<<<
> >> > my $csvresponse = $ua->post($https_downmngrform, [ "$https_name1"

=>
> >> ^ ^
> >> ^ ^
> >> > "$https_value2", "$https_name2" => "$https_value1", 'Download' =>

> > 'Download
> >> ^ ^ ^ ^ ^ ^
> >> ^ ^ ^ ^ ^ ^
> >> > Data' ] );
> >>
> >>
> >> perldoc -q vars
> >>
> >> What's wrong with always quoting "$vars"?

>
>
> You do not need any of those underlined quote characters:
>
> my $csvresponse = $ua->post($https_downmngrform, [ $https_name1 =>
> $https_value2, $https_name2 => $https_value1, ...
>
>
> will work fine.
>
> "perldoc -q" is how you look up a Perl Frequently Asked Question.
>
>
> >> > It also indicates success when I substitute a nonsensical string

> > for
> >> > one of the values. Can someone suggest what might be a problem.
> >>
> >>
> >> The resource you are talking to isn't playing nicely. (ie. it is

broken)
> >>

> > I don't understand your response. Could you be a little more descriptive

for
> > me?

>
>
> If the resource that you are communicating with reports success
> when it failed, then it contains a bug, ie. it is broken.
>
>
> --
> Tad McClellan SGML consulting
> (E-Mail Removed) Perl programming
> Fort Worth, Texas


Thanks Tad for your help.

Jim


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
testing testing neville Computer Support 16 06-05-2005 09:02 PM
testing testing neville Computer Support 2 05-27-2005 09:57 AM
testing testing 123 daniel edwards Computer Support 4 05-20-2004 10:36 PM
Post post post. Shel-hed Computer Support 2 11-08-2003 07:41 AM
testing--news2004--testing Boomer Computer Support 3 09-24-2003 06:54 PM



Advertisments