Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Print Json text from query string

by Corion (Patriarch)
on Sep 10, 2012 at 10:47 UTC ( [id://992718]=note: print w/replies, xml ) Need Help??


in reply to Print Json text from query string

Please post self-contained relevant code. The code you show is not all code that is relevant. You don't show how %PARMS gets populated for example.

Also, for a HTTP POST request, it is weird/uncommon to send the parameters in the URL string instead of as POST parameters. This may or may not contribute to a problem on the receiving end.

Replies are listed 'Best First'.
Re^2: Print Json text from query string
by perlCrazy (Monk) on Sep 10, 2012 at 10:55 UTC
    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.

      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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-24 22:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found