Skip to content

[7.x.x] Add media type to writeResultJSON response header#212

Merged
adamretter merged 2 commits into
develop-7.x.xfrom
7.x.x/hotfix/json-response
Jun 3, 2026
Merged

[7.x.x] Add media type to writeResultJSON response header#212
adamretter merged 2 commits into
develop-7.x.xfrom
7.x.x/hotfix/json-response

Conversation

@marmoure

@marmoure marmoure commented May 21, 2026

Copy link
Copy Markdown
Contributor

RESTServer#writeResultJSON Ignores the XQuery Serialization output media type setting and does not set the Content Type correctly in the HTTP Response, this PR fixes that, and enables support for:

util:declare-option("output:media-type", "application/json")
declare option output:media-type "application/json";

This PR also adds tests for RESTService to make sure it returns the correct Content-Type headers and prioritize it over the request Accept headers.

@adamretter adamretter force-pushed the 7.x.x/hotfix/json-response branch from 7090080 to 64f733e Compare June 3, 2026 17:18
@codacy-production

codacy-production Bot commented Jun 3, 2026

Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@adamretter adamretter merged commit 1367b60 into develop-7.x.x Jun 3, 2026
12 of 15 checks passed
@adamretter adamretter deleted the 7.x.x/hotfix/json-response branch June 3, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cla-signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants