Qore Mime Module Reference 1.4.4
|
Functions | |
string | Mime::get_mime_type_from_ext (string path, string def_type=MimeTypeUnknown) |
string | Mime::mime_decode_urlencoded_string (string str) |
decodes the given string from URL encoded format More... | |
string | Mime::mime_get_form_urlencoded_string (hash h) |
returns a string in MIME multipart form URL encoded format (for use with "Content-Type: application/x-www-form-urlencoded" data) More... | |
string | Mime::mime_get_urlencoded_string (auto val) |
returns a single string in MIME URL encoded format More... | |
hash< auto > | Mime::mime_parse_form_urlencoded_string (string str) |
returns a hash corresponding to the string in MIME multipart form URL encoded format (for use with "Content-Type: application/x-www-form-urlencoded" data) More... | |
string Mime::get_mime_type_from_ext | ( | string | path, |
string | def_type = MimeTypeUnknown |
||
) |
returns the mime type for the given filename from the extension or the default type if the extension is not present or unknown
string Mime::mime_decode_urlencoded_string | ( | string | str | ) |
decodes the given string from URL encoded format
str | the URL encoded string to decode |
string Mime::mime_get_form_urlencoded_string | ( | hash | h | ) |
returns a string in MIME multipart form URL encoded format (for use with "Content-Type: application/x-www-form-urlencoded"
data)
Parameters will be separated by "&"
characters. All key values must be strings or convertible to strings or a URLENCODED-TYPE-ERROR exception is thrown
h | the hash to use to generate the string |
application/x-www-form-urlencoded
formatURLENCODED-TYPE-ERROR | hash value cannot be converted to a string |
INVALID-CHARACTER | an invalid character has been found |
string Mime::mime_get_urlencoded_string | ( | auto | val | ) |
returns a single string in MIME URL encoded format
reserved characters are replaced with percent encoding, characters outside the ASCII character set cause an exception to be thrown
val | the input value |
INVALID-VALUE | the value given cannot be converted to a string |
INVALID-CHARACTER | an invalid character has been found |
'+'
signs but rather encoded as %20
because '+'
signs are often encoded and decoded improperly in URLs, and %20
is unambiguoushash< auto > Mime::mime_parse_form_urlencoded_string | ( | string | str | ) |
returns a hash corresponding to the string in MIME multipart form URL encoded format (for use with "Content-Type: application/x-www-form-urlencoded"
data)
str | the string to parse |
URLENCODED-PARSE-ERROR | cannot parse the given string |