Updated Library conneg (markdown)

This commit is contained in:
colin-adams
2012-06-15 08:09:39 -07:00
parent 53a206694a
commit c9b11a6401

View File

@@ -11,8 +11,8 @@ The user agent (a web browser, for example. or the curl program), can request di
Next, we need to declare all the representations we support: Next, we need to declare all the representations we support:
` mime_types_supported: LINKED_LIST [STRING] is mime_types_supported: LINKED_LIST [STRING] is
-- Media types 'Current' supports -- Media types `Current' supports
once once
create Result.make create Result.make
Result.put_front ({HTTP_MIME_TYPES}.application_xml) Result.put_front ({HTTP_MIME_TYPES}.application_xml)
@@ -23,7 +23,7 @@ Next, we need to declare all the representations we support:
end end
charsets_supported: LINKED_LIST [STRING] is charsets_supported: LINKED_LIST [STRING] is
-- Character sets 'Current' supports -- Character sets `Current' supports
once once
create Result.make create Result.make
Result.put_front ("UTF-8") Result.put_front ("UTF-8")
@@ -33,7 +33,7 @@ Next, we need to declare all the representations we support:
end end
encodings_supported: LINKED_LIST [STRING] is encodings_supported: LINKED_LIST [STRING] is
-- Encodings 'Current' supports -- Encodings `Current' supports
once once
create Result.make create Result.make
Result.put_front ("identity") Result.put_front ("identity")
@@ -44,7 +44,7 @@ Next, we need to declare all the representations we support:
end end
languages_supported: LINKED_LIST [STRING] is languages_supported: LINKED_LIST [STRING] is
-- Languages 'Current' supports -- Languages `Current' supports
once once
create Result.make create Result.make
Result.put_front ("en") Result.put_front ("en")
@@ -55,8 +55,8 @@ Next, we need to declare all the representations we support:
Now we are in a position to do some negotiating. At the beginning of your handler(s), code: Now we are in a position to do some negotiating. At the beginning of your handler(s), code:
`
local local
l_media_variants: MEDIA_TYPE_VARIANT_RESULTS l_media_variants: MEDIA_TYPE_VARIANT_RESULTS
do do
l_media_variants:= conneg.media_type_preference (mime_types_supported, a_req.http_accept) l_media_variants:= conneg.media_type_preference (mime_types_supported, a_req.http_accept)