-
Notifications
You must be signed in to change notification settings - Fork 176
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
fix(java): Add accept header if endpoint has errors #5848
fix(java): Add accept header if endpoint has errors #5848
Conversation
.url(httpUrl) | ||
.method("DELETE", null) | ||
.headers(Headers.of(clientOptions.headers(requestOptions))) | ||
.addHeader("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.
Success!
|
||
Set<String> contentTypes = new HashSet<>(); | ||
|
||
// TODO: We'll need to get error content types from the IR once they're available. |
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.
Discussed offline - we can actually model this in a way where the httpEndpoint
has an accept
property that represents the set of Accept
header values that should be sent in the request. Same idea that you're capturing here, just slightly different implementation.
If an endpoint has errors, we need to pass in an accept header for application/json. In the future we'll want to delegate determining the content type to the IR but for now it's okay to have this here to get around customer issues.