-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support absolute uri in request_json
#127
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #127 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 178 187 +9
=========================================
+ Hits 178 187 +9 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to add a few unit tests to make sure that we detect absolute vs relative paths correctly?
@DilumAluthge I added tests but #127 (comment) is not resolved yet - I'm fine with your suggestion as well, I'd just like to confirm that you would still prefer it 🙂 |
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
According to the specs (https://www.hl7.org/fhir/R4/datatypes.html#uri), uris can be relative and absolute. For instance, the links to the current and the next page in the paginated response to http://hapi.fhir.org/baseR4/Patient?given=Jason&family=Argonaut&_count=2&_pretty=true are URLs that already contain the base URL.
However, currently
request_json
does not support such paths but always assumes that thepath
string is relative to the base URL. With this PR also absolute paths are supported.This PR is based on #125.