json - how to get the information from a http head in android -


i've been given task send post message server giving json encoded message. server send responce in custom http header field “x-submissionresponse”

so far can connect server (i know because responce code 202)

but having lot of difficulty in getting information responce, below code using.

error content not available 

this code ends returning null, can see missing here?

this code above if statement ^

    error content not available 

header name = response.getfirstheader("x-submissionresponse"); string whatsinhere = ""; if (name != null)   whatsinhere = name.getvalue(); 

try using correct methods of class header. see http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/header.html


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

node.js - Bad Request - node js ajax post -

uitableview - Create and use custom prototype table cells in xamarin ios using storyboard -