4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/registertest.rb', line 4
def self.register_test(test_uri:, proxy_url: "https://tools.ostrails.eu/fdp-index-proxy/proxy")
warn "registering new test"
begin
response = RestClient::Request.execute({
method: :post,
url: proxy_url,
headers: { "Accept" => "application/json",
"Content-Type" => "application/json" },
payload: { "clientUrl": test_uri }.to_json
}).body
rescue StandardError => e
warn "response is #{response.inspect} error #{e.inspect}"
end
response
end
|