applied write_ as put_ renaming to examples

This commit is contained in:
Jocelyn Fiat
2011-12-18 12:55:42 +01:00
parent c8efa04147
commit 6b50ab8c55
3 changed files with 11 additions and 11 deletions

View File

@@ -92,8 +92,8 @@ feature -- HTTP Methods
end
h.add_header ("etag:" + etag_utils.md5_digest (l_order.out))
res.set_status_code ({HTTP_STATUS_CODE}.ok)
res.write_header_text (h.string)
res.write_string (l_msg)
res.put_header_text (h.string)
res.put_string (l_msg)
end
end
@@ -176,8 +176,8 @@ feature -- HTTP Methods
if attached {JSON_VALUE} json.value (l_order) as jv then
h.put_content_length (jv.representation.count)
res.set_status_code ({HTTP_STATUS_CODE}.ok)
res.write_header_text (h.string)
res.write_string (jv.representation)
res.put_header_text (h.string)
res.put_string (jv.representation)
end
end
@@ -219,7 +219,7 @@ feature -- HTTP Methods
h.put_utc_date (time)
end
res.set_status_code ({HTTP_STATUS_CODE}.no_content)
res.write_header_text (h.string)
res.put_header_text (h.string)
end
do_post (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
@@ -269,8 +269,8 @@ feature -- HTTP Methods
h.put_utc_date (time)
end
res.set_status_code ({HTTP_STATUS_CODE}.created)
res.write_header_text (h.string)
res.write_string (l_msg)
res.put_header_text (h.string)
res.put_string (l_msg)
end
end

View File

@@ -63,8 +63,8 @@ feature -- Execution
h.put_content_length (l_description.count)
h.put_current_date
res.set_status_code ({HTTP_STATUS_CODE}.method_not_allowed)
res.write_header_text (h.string)
res.write_string (l_description)
res.put_header_text (h.string)
res.put_string (l_description)
end
note

View File

@@ -23,8 +23,8 @@ feature {NONE} -- Initialization
do
-- To send a response we need to setup, the status code and
-- the response headers.
res.write_header ({HTTP_STATUS_CODE}.ok, <<["Content-Type", "text/plain"], ["Content-Length", "11"]>>)
res.write_string ("Hello World")
res.put_header ({HTTP_STATUS_CODE}.ok, <<["Content-Type", "text/plain"], ["Content-Length", "11"]>>)
res.put_string ("Hello World")
end
end