Skip to content
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 executing service bus topic trigger #3763

Merged
merged 2 commits into from
Jul 18, 2023
Merged

Conversation

alexweininger
Copy link
Member

@alexweininger alexweininger commented Jul 18, 2023

Fixes #3762

Using https://www.npmjs.com/package/cross-fetch here because our own clients simply cannot form the body correctly for some reason.

cross-fetch only depends on node-fetch which we already depend on via the Azure SDKs. This just gives us easy access to it.

@alexweininger alexweininger requested a review from a team as a code owner July 18, 2023 22:19
responseText = (await requestUtils.sendRequestWithExtTimeout(context, { method: 'POST', ...triggerRequest, headers, body: JSON.stringify(body) })).bodyAsText;
const response = await fetch(triggerRequest.url, {
method: 'POST',
body: JSON.stringify({
Copy link
Member

Choose a reason for hiding this comment

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

Stringify the stringify, ehh?

@alexweininger alexweininger merged commit 7ced659 into main Jul 18, 2023
@alexweininger alexweininger deleted the alex/emerald-guanaco branch July 18, 2023 23:30
@microsoft microsoft locked and limited conversation to collaborators Sep 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Executing a local service bus topic trigger gives "Unexpected status code: 400" error with JSON request body
2 participants