Skip to content

Commit b46649f

Browse files
github-actions[bot]CompatHelper JuliadevmotionDilumAluthge
authored
Update to HTTP v1 and drop support for older versions of HTTP (#7)
* CompatHelper: bump compat for HTTP to 1, (keep existing compat) * Drop HTTP 0.9 * Fix compatibility with HTTP 1 * Bump Julia compat to 1.6 * Add finalize job * Allow nightly test failures --------- Co-authored-by: CompatHelper Julia <[email protected]> Co-authored-by: David Widmann <[email protected]> Co-authored-by: Dilum Aluthge <[email protected]>
1 parent 84ead00 commit b46649f

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

.github/workflows/ci.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,29 @@ on:
88
- master
99
tags: '*'
1010
jobs:
11+
finalize:
12+
needs: [test, docs]
13+
if: always()
14+
runs-on: ubuntu-latest
15+
steps:
16+
- run: |
17+
echo test: ${{ needs.test.result }}
18+
echo docs: ${{ needs.docs.result }}
19+
- run: exit 1
20+
# Make sure that every line (except for the last line) ends in `||`.
21+
# Make sure that the last line does NOT end in `||`.
22+
if: |
23+
(needs.test.result != 'success') ||
24+
(needs.docs.result != 'success')
1125
test:
1226
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
1327
runs-on: ${{ matrix.os }}
28+
continue-on-error: ${{ matrix.version == 'nightly' }}
1429
strategy:
1530
fail-fast: false
1631
matrix:
1732
version:
18-
- '1.5'
33+
- '1.6'
1934
- '1'
2035
- 'nightly'
2136
os:

Project.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SMARTBackendServices"
22
uuid = "78af60b6-7677-4c75-8291-bd270d1b4390"
33
authors = ["Dilum Aluthge", "contributors"]
4-
version = "2.0.0"
4+
version = "2.1.0"
55

66
[deps]
77
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
@@ -13,12 +13,12 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1313
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
1414

1515
[compat]
16-
HTTP = "0.9.3"
16+
HTTP = "1"
1717
HealthBase = "1.0.1"
1818
JSON3 = "1.5.1"
1919
JWTs = "0.2.4"
2020
URIs = "1.2"
21-
julia = "1.5"
21+
julia = "1.6"
2222

2323
[extras]
2424
MbedTLS = "739be429-bea8-5141-9913-cc70e7f3736d"

src/backend_services.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function _token_endpoint_wellknown(config::BackendServicesConfig)
3434
# In principle, it should be possible to omit the header
3535
# (and servers may ignore it anyway)
3636
# Ref: https://www.hl7.org/fhir/smart-app-launch/conformance.html#using-well-known
37-
headers = ("Accept" => "application/json",),
37+
headers = ["Accept" => "application/json"],
3838
# Old servers might still only support the /metadata endpoint (even though its use for SMART capabilities is deprecated)
3939
# Hence we do not throw an exception if the request fails but try the /metadata endpoint first
4040
# Ref: https://hl7.org/fhir/smart-app-launch/1.0.0/conformance/index.html#declaring-support-for-oauth2-endpoints
@@ -66,7 +66,7 @@ function _token_endpoint_metadata(config::BackendServicesConfig)
6666
joinpath(config.base_url, "metadata");
6767
# We only support FHIR version R4
6868
# Ref: https://hl7.org/fhir/R4/versioning.html#mt-version
69-
headers = ("Accept" => "application/fhir+json; fhirVersion=4.0"),
69+
headers = ["Accept" => "application/fhir+json; fhirVersion=4.0"],
7070
# We throw our own, hopefully more descriptive, exception if necessary
7171
status_exception = false,
7272
)
@@ -141,7 +141,7 @@ function backend_services(config::BackendServicesConfig)
141141
_response = HTTP.request(
142142
"POST",
143143
token_endpoint;
144-
headers = ("Content-Type" => "application/x-www-form-urlencoded",),
144+
headers = ["Content-Type" => "application/x-www-form-urlencoded"],
145145
body = URIs.escapeuri(body_params),
146146
)
147147

0 commit comments

Comments
 (0)