Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Set Content-Type as application/json to JSON endpoints - #1596

Merged
rfratto merged 2 commits into
mainfrom
set_content_type
Apr 12, 2022
Merged

rfratto merged 2 commits into
mainfrom
set_content_type

Conversation

@marctc

@marctc marctc commented Apr 12, 2022 •

Copy link
Copy Markdown
Contributor

PR Description

API endpoints using WriteResponse and WriteError helpers alway return a JSON object.
This PRs sets the Content-Type HTTP header to application/json for the endpoints using these helpers.

Which issue(s) this PR fixes

Fixes #1506

Notes to the Reviewer

PR Checklist

  • CHANGELOG updated
  • Documentation added
  • Tests updated

@marctc marctc changed the title Set application/json content-type to JSON endpoints Set Content-Type as application/json to JSON endpoints Apr 12, 2022
@rfratto
rfratto merged commit cff7cb4 into main Apr 12, 2022
@rfratto
rfratto deleted the set_content_type branch April 12, 2022 17:38
@rfratto rfratto added this to the v0.24.1 milestone Apr 13, 2022
rfratto pushed a commit to rfratto/agent that referenced this pull request Apr 14, 2022
…old-storage#1596)

* Set json content-type to JSON endpoints

* Update CHANGELOG

(cherry picked from commit cff7cb4)
@rfratto rfratto mentioned this pull request Apr 14, 2022
rfratto added a commit that referenced this pull request Apr 14, 2022
* Set up the default logger parameters (#1611)

* Set up the default logger parameters

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Set up the default logger parameters vol.2

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
(cherry picked from commit 3b8d8b9)

* pkg/operator/config: don't set non-existent username_file field (#1612)

PR #1441 introduced a change to use password_file for basic auth, but
accidentally also generated a username_file field which doesn't exist.

(cherry picked from commit 378ffed)

* Bump GitHub exporter version (#1589)

* bump version of github-exporter

This bumps the version of github-exporter to the latest upstream commit,
fixing numerous bugs since the latest development release.

Closes #1588.

* add changelog entry

Also add a retroactive changelog entry for #1584

(cherry picked from commit 61e8f37)

* udpate import order in agentctl main.go (#1584)

(cherry picked from commit 78aa623)

* Embed time zone data for logs package (#1594)

(cherry picked from commit 2c53aff)

* changelog: add changelog entry for agentctl version info bugfix

* Set `Content-Type` as `application/json` to JSON endpoints (#1596)

* Set json content-type to JSON endpoints

* Update CHANGELOG

(cherry picked from commit cff7cb4)

* prepare for 0.24.1 release

Co-authored-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
Co-authored-by: Robert Lankford <robert.lankford@grafana.com>
Co-authored-by: Marc Tudurí <marctc@protonmail.com>
@github-actions github-actions Bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Mar 29, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API responses should return application/json content type

3 participants