-
Notifications
You must be signed in to change notification settings - Fork 6
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
[#2804] Update headers for requests with Haal Centraal API client #1438
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1438 +/- ##
========================================
Coverage 94.58% 94.58%
========================================
Files 1069 1071 +2
Lines 39623 39665 +42
========================================
+ Hits 37478 37518 +40
- Misses 2145 2147 +2 ☔ View full report in Codecov by Sentry. |
418c06a
to
81a5765
Compare
@alextreme I added a field to the Haal Centraal configuration for the |
@pi-sigma I'm not sure what the purpose of x-verwerking is, so having this working the same as OF seems like a smart idea |
81a5765
to
294c41b
Compare
src/open_inwoner/haalcentraal/api.py
Outdated
"Content-Type": "application/json", | ||
"Accept": "application/json", |
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.
I suspect this is taken care of by using the json
kwarg to the post
below, though I am not sure about the Accept
(perhaps they also deal in XML?), so we might want to keep that.
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.
You're right about "Content-Type", this is handled by the requests library. The "Accept" header is not, so I'm keeping this.
294c41b
to
654f194
Compare
- add headers for 'doelbinding', 'origin-oin' , 'verwerking' and 'gebruiker' to requests maded with version 2.1 of the Haal Centraal client
654f194
to
788a34d
Compare
Okay, it may have been a bit more flexible if GebruikerZelf could also have been made configurable |
We need to pass additional headers for requests made with the Haal Centraal API client (these are not required by the API itself, but needed for integration of other services in connection with the API, e.g. PinkRoccade):
x-origin-oin
x-doelbinding
x-verwerking
x-gebruiker
Taiga: https://taiga.maykinmedia.nl/project/open-inwoner/task/2804
See also the implementation in Open Forms: open-formulieren/open-forms#3731