UrlConnection.getHeaderField(string name) returning null

HRFMForum

New Member
working on a URlconnection problemThe connection object is created by invoking the openConnection() method on a URL and the general request is manipualted. then i initialized a string in which i am expecting a uniqueid from the function getHeaderfield(string name). After that i need to perform actual connection to the remote object using connect() method\[code\] call for openConnection() String uniqueid=null; call for connect() uniqueid=UrlConnection.getHeaderField(Headername);\[/code\]here i am getting the value of uniqueid as null.When i researched on topic i get to know that the actual function getHeaderField(string) returns null only (found in rt.jar in java package under java.net.UrlConection.class).But the oracle docs says http://docs.oracle.com/javase/1.5.0...nection.html#getHeaderField(java.lang.String)that it returns the value of the named header. Can anyone explain the behaviour of getHeaderField()method ?
 
Back
Top