Hi all, As we know NGSI 9/10 is an interface based on the HTTP protocol. In the HTTP protocol there are several methods, but in our case we only used GET, POST, PUT and DELETE. Also HTTP is a request/response protocol, which means your computer send a request for some file (e.g. "Get a file index.html") and the web server send back a response followed by the file itself. That request which your computer sends to the web server contains all sorts of (potentially) interesting information. In order to accept the request and to send the appropriate response back to your computer, the web server necessarily has to know some information. Actually the most important request method is usually either "GET" and "POST. For the Ngsi9/10 implementation some informations about the header are required (Request method and content) - My proposal is: · For the GET request (Producing content) we can set the Header that Accept = application/xml · For the POST request (Consuming content) we can set the header with accept Content-type=application/xml - Why application/xml ?? XML has two MIME types, application/xml and text/xml. These are often used interchangeably, but there is a subtle difference which is why application/xml is generally recommended over the latter. Let me explain why: according to the standard, text/*-MIME types have a us-ascii character set unless otherwise specified in the HTTP headers. This effectively means that any encoding defined in the XML prolog (e.g. <?xml version="1.0" encoding="UTF-8"?>) is ignored. This is of course not the expected and desired behaviour. To further complicate matters, most/all browser implementations actually implement nonstandard behaviour for text/xml because they process the encoding as if it were application/xml. So, text/* has encoding issues, and is not implemented by browsers in a standards-compliant manner, which is why using application/* is recommended. Any comment?? BR, - Salvatore Longo ________________________________ Salvatore Longo Software Engineer NEC Europe Ltd. Kurfürsten-Anlage 36 D-69115 Heidelberg Tel. +49/(0) 62 21/43 42 - 246 Fax. +49/(0) 62 21/43 42 - 115 E-Mail: Salvatore.longo at neclab.eu NEC Europe Limited Registered Office: NEC House, 1 Victoria Road, London W3 6BL Registered in England 2832014 ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.fiware.org/private/fiware-ngsi/attachments/20120515/e85d0d94/attachment.html>
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy