HTTP API: Pass job timeout in HTTP headers 21/182921/6
authorMaciej Wereski <m.wereski@partner.samsung.com>
Fri, 1 Jun 2018 12:49:10 +0000 (14:49 +0200)
committerMaciej Wereski <m.wereski@partner.samsung.com>
Tue, 10 Jul 2018 08:17:22 +0000 (10:17 +0200)
commit78b25025284b815bcf8b96197ec461a4fd670abb
tree28d8c07d717bcf4e4206353cbf4672c27994f8b1
parent60817fcf2d0e46ed557cb0ffa9e905035dbcdc73
HTTP API: Pass job timeout in HTTP headers

Users may want to check timeout value when request gets its resources
or access to worker is prolonged. Currently it can be only done with
GetRequestInfo() which returns all information about given request. To
make this action more convenient HTTP API server will set
Boruta-Job-Timeout header when request is in "IN PROGRESS" state. On the
client side GetJobTimeout is added. It should be also faster way to
obtain timeout value as HEAD method is used instead of GET and there's
no JSON parsing.

Change-Id: I9533f64be063e97b09c5e378a87968395d6b4072
Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
http/client/client.go
http/client/client_test.go
http/http.go
http/server/api/v1/api.go
http/server/api/v1/handlers_test.go
http/server/api/v1/testdata/req-info-running-GET.json [new file with mode: 0644]