Help testing post response

Discussion in 'Perl Misc' started by Jim Simpson, Jul 13, 2004.

  1. Jim Simpson

    Jim Simpson Guest

    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
     
    Jim Simpson, Jul 13, 2004
    #1
    1. Advertising

  2. Jim Simpson <> 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
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jul 13, 2004
    #2
    1. Advertising

  3. Jim Simpson

    Jim Simpson Guest

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


    "Tad McClellan" <> wrote in message
    news:...
    > Jim Simpson <> 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
    > Perl programming
    > Fort Worth, Texas
     
    Jim Simpson, Jul 14, 2004
    #3
  4. [ 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 <> wrote:
    > "Tad McClellan" <> wrote in message
    > news:...
    >> Jim Simpson <> 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
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jul 14, 2004
    #4
  5. Jim Simpson

    Jim Simpson Guest

    "Tad McClellan" <> wrote in message
    news:...
    >
    > [ 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 <> wrote:
    > > "Tad McClellan" <> wrote in message
    > > news:...
    > >> Jim Simpson <> 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
    > Perl programming
    > Fort Worth, Texas


    Thanks Tad for your help.

    Jim
     
    Jim Simpson, Jul 15, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian van den Broek
    Replies:
    3
    Views:
    875
    Jeremy Bowers
    Apr 3, 2005
  2. Brian van den Broek
    Replies:
    2
    Views:
    408
    Brian van den Broek
    Apr 5, 2005
  3. Chris

    Testing and Load Testing

    Chris, Mar 4, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    343
  4. John Maclean
    Replies:
    1
    Views:
    365
    Martin P. Hellwig
    Apr 13, 2010
  5. Avi
    Replies:
    0
    Views:
    514
Loading...

Share This Page