Files
EWF/library/network/protocol/content_negotiation
Jocelyn Fiat 30a5e087ae Web form:
- Improvement about web form manipulation (remove a field, set a text value to input fields by name, ...)
 - Improved web form html generation, especially for select and type checkbox
 - Updated the date input field interface with a new set_date_value .

File response:
 - "application/force-download" is not a standard MIME content type, so use "application_octet_stream" instead as default.

Standalone connector:
 - Added expected creation procedure for the service launcher.
 - Added new "secure_port" configuration variable, for SSL standalone service.
   This way, if `is_secure` is True, the server will use `secure_port` (overrides `port` value).

Date:
 - Improved support for RFC 3339 (a profile of ISO 8601)

Removed obsolete and warnings:
 - removed usage of FILE_NAME
 - updated code to avoid implicit conversion from STRING_32 to STRING_8
 - avoid uneed conversion to STRING_8 (when possible)
2020-10-02 15:02:06 +02:00
..
2020-10-02 15:02:06 +02:00
2020-10-02 15:02:06 +02:00
2017-10-06 14:06:46 +02:00
2013-10-18 20:44:36 +02:00

CONNEG is a library that provides utilities to select the best repesentation of a resource for a client where there are multiple representations available.

Using this library you can retrieve the best variant for media type, language preference, charset, and enconding/compression.

Take into account that the library is under development so is expected that the API change.

The library contains utilities that deal with content negotiation (server driven negotiation).This utility class is based on ideas taken from the Book Restful WebServices Cookbook

The class SERVER_CONTENT_NEGOTIATION contains several features that helps to write different types of negotiation (media type, language, charset and compression). So for each of the following questions, you will have a corresponding method to help in the solution.

  • How to implement Media type negotiation? Hint: Use SERVER_CONTENT_NEGOTIATION.media_type_preference or SERVER_MEDIA_TYPE_NEGOTIATION.preference

  • How to implement Language Negotiation? Hint: Use SERVER_CONTENT_NEGOTIATION.language_preference or SERVER_LANGUAGE_NEGOTIATION.preference

  • How to implement Character Negotiation? Hint: Use SERVER_CONTENT_NEGOTIATION.charset_preference or SERVER_CHARSET_NEGOTIATION.preference

  • How to implement Encoding Negotiation? Hint: Use SERVER_CONTENT_NEGOTIATION.encoding_preference or SERVER_ENCODING_NEGOTIATION.preference

There is also a test case where you can check how to use this class.