-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add Accept header for integration tests #714
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
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| createHeaders() { | ||
| return { | ||
| 'Accept': 'application/vnd.openactive.booking+json; version=1', |
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.
If I've understood content negotiation properly, this is needed for all requests to Bookings Systems
| createHeaders() { | ||
| return { | ||
| 'Accept': 'application/vnd.openactive.booking+json; version=1', | ||
| 'Content-Type': 'application/vnd.openactive.booking+json; version=1', |
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.
This is needed to say what the content type of the request is
lukehesluke
left a comment
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.
@civsiv it looks like the Broker has two places where it sets the wrong Accept headers also. It sets Accept: 'application/json, application/vnd.openactive.booking+json; version=1',, which has an extraneous application/json.
It is possible there's some legacy reason for this
|
Also, packages/openactive-integration-tests/test/global-setup.js's |
No description provided.