Skip to content

Commit e288d17

Browse files
committed
Set up a bigger timeout.
Added accept header for collection+json media type.
1 parent 502b8eb commit e288d17

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/kernel/cj_client.e

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ feature {NONE} -- Initialization
1616
-- Initialize `Current'.
1717
do
1818
create {LIBCURL_HTTP_CLIENT_SESSION} client.make (a_service) --"http://jfiat.dyndns.org:8190")
19+
client.set_timeout (25)
1920
end
2021

2122
feature -- Access
@@ -71,6 +72,7 @@ feature -- Access
7172
if l_ctx = Void then
7273
create l_ctx.make
7374
end
75+
l_ctx.add_header ("Accept", "application/vnd.collection+json")
7476
l_ctx.add_header ("Content-Type", "application/vnd.collection+json")
7577

7678
if attached cj_template_to_json (tpl) as j then
@@ -112,6 +114,8 @@ feature -- Access
112114
create l_ctx.make
113115
end
114116
l_ctx.add_header ("Content-Type", "application/vnd.collection+json")
117+
l_ctx.add_header ("Accept", "application/vnd.collection+json")
118+
115119

116120
if attached cj_template_to_json (tpl) as j then
117121
d := "{ %"template%": " + j.representation + " }"
@@ -151,6 +155,8 @@ feature -- Access
151155
create l_ctx.make
152156
end
153157
l_ctx.add_header ("Content-Type", "application/vnd.collection+json")
158+
l_ctx.add_header ("Accept", "application/vnd.collection+json")
159+
154160

155161
if attached q.data as q_data then
156162
across

0 commit comments

Comments
 (0)