Update restbuck client, create and read an order.

Update JSON converter, the id is not important, applied the DRY principle.
Update the ORDER_HANDLER to use the meta_string_variable instead of meta_variable from req.
Fix, the key in meta_variable_table, use c.key instead of c.item
This commit is contained in:
jvelilla
2011-12-10 18:05:41 -03:00
parent 0d67533c83
commit bf056154d8
5 changed files with 132 additions and 34 deletions

View File

@@ -41,7 +41,7 @@ feature -- Access
raw_header: READABLE_STRING_8
-- Raw http header of the response.
headers: LIST [TUPLE [key: READABLE_STRING_8; value: READABLE_STRING_8]]
headers: HASH_TABLE[READABLE_STRING_8,READABLE_STRING_8]
-- Computed table of http headers of the response.
local
tb: like internal_headers
@@ -86,7 +86,7 @@ feature -- Access
from until c <= n and not h[c].is_space loop
c := c + 1
end
tb.force ([k, h.substring (c, l_end)])
tb.put (h.substring (c, l_end), k)
else
check header_has_colon: c > 0 end
end
@@ -125,7 +125,9 @@ feature -- Change
feature {NONE} -- Implementation
internal_headers: detachable ARRAYED_LIST [TUPLE [key: READABLE_STRING_8; value: READABLE_STRING_8]]
-- internal_headers: detachable ARRAYED_LIST [TUPLE [key: READABLE_STRING_8; value: READABLE_STRING_8]]
-- Internal cached value for the headers
internal_headers: detachable HASH_TABLE[READABLE_STRING_8,READABLE_STRING_8]
-- Internal cached value for the headers
end

View File

@@ -33,7 +33,7 @@ feature {NONE} -- Initialization
across
l_vars as c
loop
meta_variables_table.force (new_string_value (c.key, c.item), c.item)
meta_variables_table.force (new_string_value (c.key, c.item), c.key)
end
else
create meta_variables_table.make (0)