Added `base_url' for REQUEST_ROUTER (and descendants)

Fixed implementation of REST_REQUEST_AGENT_HANDLER to avoid wrong path in inherited routine.
Allow to build a URI_TEMPLATE from another URI TEMPLATE,
   this way, if later we have more attribute (status or settings) to URI_TEMPLATE,
   we'll be able to change the `template' without breaking the settings
This commit is contained in:
Jocelyn Fiat
2011-10-05 17:09:16 +02:00
parent cc6992a6fc
commit 4c9e7a4331
5 changed files with 85 additions and 49 deletions

View File

@@ -23,18 +23,44 @@ inherit
create
make
create {URI_TEMPLATE}
make_from_uri_template
convert
make ({READABLE_STRING_8})
feature {NONE} -- Initialization
make (s: STRING)
make (s: READABLE_STRING_8)
do
template := s
end
make_from_uri_template (a_tpl: like Current)
do
template := a_tpl.template.string
end
feature -- Access
template: STRING
template: READABLE_STRING_8
-- URI string representation
duplicate: like Current
-- Duplicate object from Current
do
create Result.make_from_uri_template (Current)
end
feature -- Element change
set_template (t: like template)
-- Set `template' to `t'
do
template := t
reset
end
feature -- Status report
debug_output: STRING