Skip to content

Commit

Permalink
Add the _request_raw_response function (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge authored Dec 27, 2022
1 parent 9e40e3f commit 0e58c68
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FHIRClient"
uuid = "b44d2ca2-8176-4fa9-8684-826e17b2a2da"
authors = ["Dilum Aluthge", "Rhode Island Quality Institute", "contributors"]
version = "1.0.3"
version = "1.1.0"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down
14 changes: 12 additions & 2 deletions src/requests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ end
body::Union{AbstractString, Nothing} = nothing,
headers::AbstractDict = Dict{String, String}(),
query::Union{AbstractDict, Nothing} = nothing)::String
response = _request_raw_response(client, verb, path; body=body, headers=headers, query=query)
response_body_string::String = String(response.body)::String
return response_body_string
end

@inline function _request_raw_response(client::Client,
verb::AbstractString,
path::AbstractString;
body::Union{AbstractString, Nothing} = nothing,
headers::AbstractDict = Dict{String, String}(),
query::Union{AbstractDict, Nothing} = nothing)
full_url = _generate_full_url(client,
path)
_new_headers = Dict{String, String}()
Expand All @@ -106,8 +117,7 @@ end
query,
body)
empty!(_new_headers)
response_body_string::String = String(response.body)::String
return response_body_string
return response
end

@inline function _write_json_request_body(body::Nothing)::Nothing
Expand Down

2 comments on commit 0e58c68

@DilumAluthge
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/74683

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.0 -m "<description of version>" 0e58c68eca1e24296924a5b2600faa74e08f17b7
git push origin v1.1.0

Please sign in to comment.