Skip to content

feat(Talend/http): export http fetch to allow sending payload in delete request#5783

Open
VolodymyrKovalM wants to merge 2 commits intomasterfrom
VolodymyrKovalM/feat/export-http-fetch-to-allow-sending-payload-in-delete-request
Open

feat(Talend/http): export http fetch to allow sending payload in delete request#5783
VolodymyrKovalM wants to merge 2 commits intomasterfrom
VolodymyrKovalM/feat/export-http-fetch-to-allow-sending-payload-in-delete-request

Conversation

@VolodymyrKovalM
Copy link
Copy Markdown
Contributor

What is the problem this PR is trying to solve?
There is DELETE API in IAM which requires application names in request body
According to specification, it may not be perfect to have body in DELETE request, and may not be intended to do this way,
but, this API is used in TMC

It worked before with CMF http, as config was spread when calling interceptors https://github.com/Talend/ui/blob/master/packages/cmf/src/sagas/http.js#L179 , so, it was possible to pass payload in the config, and it would override undefined payload.
Probably this was not intended to pass payload in config and send body in delete request, most probably, it was kind of bug / "back door", but it worked for one API in TMC )

Now, as CMF has been removed from TMC, @talend/http package is used for now, and in @talend/http there is not such kind of "back door" to send body in delete request, so, the TMC part which call that API from IAM fails with error

What is the chosen solution to this problem?
For now I see few solutions

  1. Modify current httpDelete function, so, it will accept payload as argument
  2. Implement separate function, something like "httpDeleteWithPayload", to not modify existing function and impact existing code
  3. Use fetch API directly for that one DELETE request in TMC
  4. Export "httpFetch" function, to allow specific implementation for httpDelete, which will be done in TMC

for now I went with option 4, to not impact existing code, but I'm opened to discussion, if needed

(maybe in future the DELETE API in IAM will be refactored, to accept application names as GET parameters instead of request body, in this case we will not need specific TMC implementation)

Please check if the PR fulfills these requirements

  • The PR have used yarn changeset to a request a release from the CI if wanted.
  • The PR commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features) And non reg done before need review
  • Docs have been added / updated (for bug fixes / features)
  • Related design / discussions / pages (not in jira), if any, are all linked or available in the PR

[ ] This PR introduces a breaking change

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 17, 2026

🦋 Changeset detected

Latest commit: bce32b9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@talend/http Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@VolodymyrKovalM VolodymyrKovalM temporarily deployed to pull_request_unsafe April 17, 2026 12:51 — with GitHub Actions Inactive
@VolodymyrKovalM VolodymyrKovalM deployed to pull_request_unsafe April 17, 2026 12:51 — with GitHub Actions Active
@VolodymyrKovalM VolodymyrKovalM temporarily deployed to pull_request_unsafe April 17, 2026 12:51 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown
Contributor

Storybook for this PR deployed on this github page

@github-actions
Copy link
Copy Markdown
Contributor

Title Lines Statements Branches Functions
assets-api Coverage: 28%
28.4% (25/88) 30.76% (16/52) 21.42% (3/14)
cmf Coverage: 89%
89.43% (1244/1391) 83.46% (626/750) 89.76% (351/391)
cmf-cqrs Coverage: 86%
86.33% (158/183) 71.42% (60/84) 82.45% (47/57)
cmf-router Coverage: 70%
69.23% (135/195) 55.71% (78/140) 56.81% (25/44)
components Coverage: 90%
90.63% (5564/6139) 82.41% (3228/3917) 88.14% (1390/1577)
containers Coverage: 84%
83.44% (1391/1667) 75.16% (702/934) 75% (327/436)
dataviz Coverage: 85%
85.67% (329/384) 65% (156/240) 75.94% (120/158)
design-system Coverage: 67%
66.96% (1038/1550) 51.68% (552/1068) 53.92% (220/408)
faceted-search Coverage: 85%
85.35% (641/751) 80% (292/365) 82.24% (227/276)
flow-designer Coverage: 73%
72.31% (674/932) 77.71% (415/534) 71.02% (201/283)
forms Coverage: 86%
86.17% (1645/1909) 76.71% (939/1224) 84.77% (462/545)
http Coverage: 100%
100% (85/85) 98.07% (51/52) 100% (34/34)
sagas Coverage: 92%
92.3% (24/26) 66.66% (4/6) 50% (2/4)
stepper Coverage: 81%
81.81% (153/187) 60.43% (55/91) 81.25% (39/48)
utils Coverage: 100%
100% (73/73) 90.9% (10/11) 100% (24/24)

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