mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2026-03-22 04:06:18 +00:00
Progress towards background work replacement, work getting new NetworkManager and HttpClient up and running
This commit is contained in:
@@ -10,22 +10,18 @@ class W3DHub
|
||||
result = CyberarmEngine::Result.new
|
||||
context = request.context
|
||||
|
||||
task.with_timeout(30) do
|
||||
task.with_timeout(W3DHub::Api::API_TIMEOUT) do
|
||||
uri = URI(context.url)
|
||||
|
||||
pp uri
|
||||
|
||||
response = provision_http_client(uri.origin).send(
|
||||
context.method,
|
||||
uri.path,
|
||||
uri.request_uri,
|
||||
context.headers,
|
||||
context.body
|
||||
)
|
||||
|
||||
pp response
|
||||
|
||||
if response.success?
|
||||
result.data = response.body.read
|
||||
result.data = response.read
|
||||
else
|
||||
result.error = response
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user