Content-Type are important headers in Restful web services.
Accept headers tells web service what kind of response client is accepting, so if a web service is capable of sending response in XML and JSON format. and client sends Accept header as “application/xml” then XML response will be sent. For Accept header “application/json”, server will send the JSON format of response.
Content-Type header is used to tell server what is the format of data being sent in the request. If Content-Type header is “application/xml” then server will try to parse it as XML data. This header is useful in HTTP Post and Put requests.
1 thought on “RESTful Web services Interview Questions and Answers”
explained in good way but I tried to but not get chance to run..