json - HTTP error 500 on Android -


So this is my code, its purpose is to filter a json file. I get error 500 from the server, which means I know that this is an internal server error as I can not access the logs of the server, I am very worried from now on ... I have about session and cookies I read in, maybe this is it. Do you think about this boy?

  Private category listed Fit asyn Task and Late; Voided, void, string & gt; {Private static final string TAG = "listingfighter"; Public static final string SERVER_URL = "http://www.myurl.com/listing.json"; @ Override protected string doInBackground (Zero ... parameter) {try {// Create an HTTP Client HTTP Client Client = New DefaultHttpClient (); HTTP post post = new HTTP post (SERVER_URL); // Request and check the status code HTPRS response = client.execute (post); Threaded Positions = Response .getStatusLine (); If (statusLine.getStatusCode () == 200) {HttpEntity unit = response. Gatientity (); InputStream content = entity.getContent (); Try to read the {// server response and try to parse it as JSON Reader Reader = New InputStreamReader (content); Gsonbuilder gsonbuilder = new GsonBuilder (); Gsonbuilder.setDateFormat ("m / d / yy hh: mm one"); GSON GSN = GSOnBiller.Create (); & Lt; Listing & gt; Incidents = New Arrestist & lt; Listing & gt; (); Event = erase.Sistlist (GSN.frame Jason (reader, listing []. Square)); Content.close (); HandlePostsList (events); } Hold (exception preceding) {log.E (tag, "failed to parse JSON due to:" pre); FailedLoadingPosts (); }} Else {Log.e (tag, "The server responded with the status code:" + statusLine.getStatusCode ()); FailedLoadingPosts (); }} Hold (exception before) {log. A (Tag, "failed to send HTTP post request due to:" + east); FailedLoadingPosts (); } Return tap; }}  

My code is working perfectly This error is only on this line Is:

  http post posted = new HTTP post (SERVER_URL);  

what should be

  get the html gate = new HTTPPREET (SERVER_URL);  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -