Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to send a multipart/form-data POST request using tHTTPClient to the 123Paie API to import absences.
The same request works perfectly in Bruno (200 OK) with the following body:
- id: {{token}} (session token obtained from a previous login call)
- appli: STD
- pto: upload_absences_std
- date: 122025
- filename: 260429Absences.txt
- charset: ISO8859-15
- file: @file(260429Absences.txt)
In Bruno, no Cookie or JSESSIONID is needed — just the token in the body.
In Talend, I configured tHTTPClient as follows:
- Method: POST
- Body: Form data (multipart)
- Parameters in body: id, appli, pto, date, filename, charset
- File attachment: file = 260429Absences.txt (application/octet-stream, ISO8859-15)
- Token retrieved correctly via globalMap (confirmed with System.out.println)
However, I always get a 403 Forbidden error.
Things I have already tried:
- Passing parameters as query string instead of body
- Adding Cookie header with JSESSIONID
- Using cookies file
- Checking token value before the call (correct)
Is there something specific about how tHTTPClient handles multipart/form-data that could cause a 403? Could it be related to the HTTP version (currently HTTP/2)?
Thank you!
Hello anyxs,
Thank you for reaching out to the Qlik community.
Yes, it’s very likely how the HTTPClient builds the multipart request, especially headers/boundary/encoding or HTTP version.
Could you please try these most important fixes:
If still failing: Talend multipart ≠ Bruno → use tRESTClient or custom HttpClient.
Thanks for your suggestions.
I’ve already tested all of the following:
Despite all this, I still consistently get a 403 Forbidden response.
I also tried using tRestClient instead of tHTTPClient, but the result is the same.
At this point, I will move forward with a custom HttpClient implementation to replicate the curl request more precisely.
Thanks 👍