in reply to Re^3: How to Post a HTTP Request for a JSON web page?
in thread How to Post a HTTP Request for a JSON web page?

Below are the response received.

"HTTP/1.1 500 Internal Server Error\nConnection: close\nDate: Tue, 14 Aug 2012 05:40:24 GMT\nServer: lighttpd/1.4.28\nContent-Length: 385\nClient-Date: Wed, 26 Mar 2014 10:39:42 GMT\nClient-Peer: 192.168.1.1:80\nClient-Response-Num: 1\nStatus: 500 Internal Server Error\n\n<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n <head>\n <title>500 - Internal Server Error</title>\n </head>\n <body>\n

500 - Internal Server Error

\n

closed

\n </body>\n</html>\n"

  • Comment on Re^4: How to Post a HTTP Request for a JSON web page?

Replies are listed 'Best First'.
Re^5: How to Post a HTTP Request for a JSON web page?
by Anonymous Monk on Mar 26, 2014 at 11:04 UTC

    well, that means the webserver (bartender) is sick -- there is nothing you can do about it (problem at their end)

    The problem might be as simple as no proper error checking, so when you send the webserver(bartender) questionable json values, its just explodes into 500 instead of doing what it was supposed to do

    There is just no way of guessing ... other than recording/reproducing verbatim existing browser sessions, in most every conceivable detail ... all those various headers you're not including like X-JNA....

Re^5: How to Post a HTTP Request for a JSON web page?
by vchinnat (Initiate) on Mar 26, 2014 at 12:55 UTC

    I have tried given all the options like X-JNAP-Action, X-JNAP-Authorization, Content_type, charset to the headers but still it didn't help. I have no clue to fix this.

      I have tried given all the options like X-JNAP-Action, X-JNAP-Authorization, Content_type, charset to the headers but still it didn't help. I have no clue to fix this.

      Did you try all of them together?

      This is the reality of internet communication, you're talking with a black box, that black box is free to be as picky and stupid as it wants, if you don't talk to it in exactly the way it wants, it doesn't give you what you want

      If you can use your browser like firefox, to successfully do what you want, you can try WWW::Mechanize::Firefox, its a perl modules that talks to a firefox plugin that drives firefox