Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Print Json text from query string

by perlCrazy (Monk)
on Sep 10, 2012 at 10:55 UTC ( #992720=note: print w/ replies, xml ) Need Help??


in reply to Re: Print Json text from query string
in thread Print Json text from query string

Thanks for the response.
Yes, intentionally have not posted the entire code. Please assume that query string has JSON string and server code should read and print inputparms. if i get that part, issue should be resolved.
Thanks again for your time.


Comment on Re^2: Print Json text from query string
Re^3: Print Json text from query string
by Corion (Pope) on Sep 10, 2012 at 11:04 UTC

    So, if you already have verified that your server program does see the correct data, why are you still posting both halves of the application? Or did you not verify that your server program gets the correct data?

    If you already know that your server program receives data, why did you not hardcode the received data and checked it? Eliminating the client from the problem helps reduce the number of points of failure.

    I recommend you use CGI to parse your query data in the server program. If you are using hand-rolled code to parse the query data, please eliminate that in favor of CGI or another query parser module. You should be aware that there are multiple ways to pass query data in POST requests, and I already told you that your way of passing it is different from other ways. CGI can handle both ways, but it's unclear whether your unshown code can handle them

      Thanks for prompt response.
      Issue is when JSON data is getting passed via URL, i am not able to print. Can you please help with code that can be send via url and print on the server side code.
      I am trying to create restful web service and having some difficulties while implementing this.
        1. Verify what data your server program receives. Print that data to a log file to inspect.
        2. If your server program does not receive the data you expect, debug your client program.
        3. If your program is not using CGI, please make sure you understand the difference between GET parameters and POST parameters and URLs.
        4. Make sure that your server program can handle both, GET parameters and POST parameters. Read LWP::Request about how to send POST parameters.
        5. Verify that what your server program decodes is what you expect. Print that data to a log file to inspect.
        6. If your server program does not decode what you expect, post a relevant minimal version of your server program with hardcoded data so that we don't need a webserver or a client program.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://992720]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2014-09-16 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (45 votes), past polls