Sha256: 7db1a7a77f540980f470373f7b337f65d9d734ad5d7773b0e1c3149190fbd72f
Contents?: true
Size: 1.01 KB
Versions: 27
Compression:
Stored size: 1.01 KB
Contents
module ONCCertificationG10TestKit module ExportKickOffPerformer def perform_export_kick_off_request(use_token: true, params: {}) skip_if use_token && bearer_token.blank?, 'Could not verify this functionality when bearer token is not set' headers = { accept: 'application/fhir+json', prefer: 'respond-async' } headers.merge!({ authorization: "Bearer #{bearer_token}" }) if use_token url = "Group/#{group_id}/$export" param_str = params.map { |k, v| URI.encode_www_form(k => v) }.join('&') url.concat("?#{param_str}") unless param_str.empty? get(url, client: :bulk_server, name: :export, headers:) end def delete_export_kick_off_request polling_url = request&.response_header('content-location')&.value assert polling_url.present?, 'Export response header did not include "Content-Location"' headers = { accept: 'application/json', authorization: "Bearer #{bearer_token}" } delete(polling_url, headers:) assert_response_status(202) end end end
Version data entries
27 entries across 27 versions & 1 rubygems