added support for data in POST request

This commit is contained in:
Jocelyn Fiat
2011-10-06 19:09:17 +02:00
parent 720d8be08a
commit e5eb11b4e7
4 changed files with 64 additions and 4 deletions

View File

@@ -38,6 +38,10 @@ feature -- Access
form_data_parameters: HASH_TABLE [READABLE_STRING_32, READABLE_STRING_8]
upload_data: detachable READABLE_STRING_8
upload_filename: detachable READABLE_STRING_8
feature -- Status report
has_form_data: BOOLEAN
@@ -45,6 +49,16 @@ feature -- Status report
Result := not form_data_parameters.is_empty
end
has_upload_data: BOOLEAN
do
Result := attached upload_data as d and then not d.is_empty
end
has_upload_filename: BOOLEAN
do
Result := attached upload_filename as fn and then not fn.is_empty
end
feature -- Element change
add_query_parameter (k: READABLE_STRING_8; v: READABLE_STRING_32)
@@ -62,4 +76,18 @@ feature -- Element change
credentials_required := b
end
set_upload_data (a_data: like upload_data)
require
has_no_upload_data: not has_upload_data
do
upload_data := a_data
end
set_upload_filename (a_fn: like upload_filename)
require
has_no_upload_filename: not has_upload_filename
do
upload_filename := a_fn
end
end