Module: BulkDataTestKit::BulkDataV200Client::ServerProxy
Instance Method Summary
collapse
Methods included from URLs
#base_url, #fhir_url, #output_url, #resume_pass_url, #status_url, #suite_id
Instance Method Details
#proxy_client ⇒ Object
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/bulk_data_test_kit/v2.0.0_client/server_proxy.rb', line 8
def proxy_client
@proxy_client ||= Faraday.new(
url: ENV.fetch('FHIR_REFERENCE_SERVER'),
params: {},
headers:
) do |proxy|
proxy.use FaradayMiddleware::Gzip
proxy.options.params_encoder = Faraday::FlatParamsEncoder
end
end
|
23
24
25
26
27
28
29
|
# File 'lib/bulk_data_test_kit/v2.0.0_client/server_proxy.rb', line 23
def
{
'Content-Type' => 'application/json',
'Authorization' => 'Bearer SAMPLE_TOKEN',
'Prefer' => 'respond-async'
}
end
|
#rewrite_url_base(url) ⇒ Object
19
20
21
|
# File 'lib/bulk_data_test_kit/v2.0.0_client/server_proxy.rb', line 19
def rewrite_url_base(url)
url.gsub(ENV.fetch('FHIR_REFERENCE_SERVER'), fhir_url)
end
|