Skip to content

Conversation

chaoky
Copy link

@chaoky chaoky commented Jan 13, 2025

with this change a { jsonBody: null } will be serialized as JSON, in pair with how JSON.stringfy works
#325

@chaoky chaoky requested a review from a team as a code owner January 13, 2025 21:37
@chaoky
Copy link
Author

chaoky commented Jan 13, 2025

/azp run

Copy link

Commenter does not have sufficient privileges for PR 326 in repo Azure/azure-functions-nodejs-library

@hallvictoria
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -27,7 +27,7 @@ export class HttpResponse implements types.HttpResponse {
this.#uRes = init.undiciResponse;
} else {
const uResInit: uResponseInit = { status: init.status, headers: init.headers };
if (isDefined(init.jsonBody)) {
if (init.jsonBody !== undefined) {
this.#uRes = uResponse.json(init.jsonBody, uResInit);
Copy link
Contributor

@swapnil-nagar swapnil-nagar Feb 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have tests, covering these change?

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.

4 participants