Skip to content

GPHDRUI-427: Fix GET requests sending a stray "null" body under axios… - #167

Closed
thomashilz wants to merge 1 commit into
InterNetX:masterfrom
thomashilz:GPHDRUI-427
Closed

GPHDRUI-427: Fix GET requests sending a stray "null" body under axios…#167
thomashilz wants to merge 1 commit into
InterNetX:masterfrom
thomashilz:GPHDRUI-427

Conversation

@thomashilz

Copy link
Copy Markdown
Collaborator

… 1.x

sendRequest() defaulted data to null and always attached it to the axios request config. With axios 1.18.1 (bumped from 0.x in a prior commit) and the forced Content-Type: application/json default header, this caused axios to serialize the null default into a literal "null" body on every GET request, which some APIs (e.g. account-json-server) reject as an invalid top-level JSON value.

data is now only attached when explicitly provided, and sendGetRequest() accepts an optional body for callers that need one.

… 1.x

sendRequest() defaulted `data` to `null` and always attached it to the
axios request config. With axios 1.18.1 (bumped from 0.x in a prior
commit) and the forced Content-Type: application/json default header,
this caused axios to serialize the null default into a literal "null"
body on every GET request, which some APIs (e.g. account-json-server)
reject as an invalid top-level JSON value.

`data` is now only attached when explicitly provided, and
sendGetRequest() accepts an optional body for callers that need one.
@thomashilz thomashilz closed this Jul 23, 2026
@thomashilz
thomashilz deleted the GPHDRUI-427 branch July 23, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant