Skip to content

Commit

Permalink
default to json
Browse files Browse the repository at this point in the history
  • Loading branch information
radamson committed Apr 18, 2019
1 parent c1a280c commit 98cce67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fhir_client/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Client
# @param default_format Default Format Mime type
# @return
#
def initialize(base_service_url, default_format: FHIR::Formats::ResourceFormat::RESOURCE_XML, proxy: nil)
def initialize(base_service_url, default_format: FHIR::Formats::ResourceFormat::RESOURCE_JSON, proxy: nil)
@base_service_url = base_service_url
FHIR.logger.info "Initializing client with #{@base_service_url}"
@use_format_param = false
Expand Down
3 changes: 3 additions & 0 deletions test/unit/bundle_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def test_example_bundle

def test_next_bundle
client = FHIR::Client.new('bundle-test')
client.default_xml
root = File.expand_path '..', File.dirname(File.absolute_path(__FILE__))
bundle_xml = File.read(File.join(root, 'fixtures', 'bundle-example.xml'))
response = {
Expand All @@ -38,6 +39,7 @@ def test_next_bundle

def test_each
client = FHIR::Client.new('bundle-test')
client.default_xml
root = File.expand_path '..', File.dirname(File.absolute_path(__FILE__))
bundle_xml = File.read(File.join(root, 'fixtures', 'bundle-example.xml'))
response = {
Expand All @@ -61,6 +63,7 @@ def test_each

def test_each_no_block
client = FHIR::Client.new('bundle-test')
client.default_xml
root = File.expand_path '..', File.dirname(File.absolute_path(__FILE__))
bundle_xml = File.read(File.join(root, 'fixtures', 'bundle-example.xml'))
response = {
Expand Down

0 comments on commit 98cce67

Please sign in to comment.