android - HTTPResponse handling invalid content type -
android - HTTPResponse handling invalid content type -
i have below code :
httpget httpget = new httpget(params[0] + params[1]); httpget.setheader("content-type", "application/json"); httpget.setheader("accept", "application/json"); httpresponse = httpclient.execute(httpget); if (httpresponse != null) { // }
as can see content-type application/json.
but receive content-type text/html, need check if response application/json process.we can have equalsignorecase check looking improve solution.
android json http httpresponse content-type
Comments
Post a Comment