• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting content-type in HTTPURLConnection ?

 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I was adding this method in my client code:



When i try to call the following method : it does retrieve "application/xml" What can be the possible reason for this or i am doing something wrong for setting the content type.



Any clues ?

Thanks,
Rahul
 
Rob Spoor
Sheriff
Pie
Posts: 20546
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
connection.getContentType() returns the Content-Type as returned by the server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic