Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
anyxs
Contributor II
Contributor II

tRESTClient

Bonjour,

Je rencontre des difficultés avec tRestClient pour envoyer un fichier .txt via une API REST.

 Mon besoin :

  • envoyer un fichier (texte tabulé \t)

  • soit en binaire (text/plain / application/octet-stream)

  • soit en multipart/form-data

 Problème :

  • Content-Type limité à JSON / XML / FORM

  • impossible d’envoyer un fichier en multipart (pas de paramètre de type file)

  • pas de gestion simple du binaire

  • réponse en type Document non modifiable

 Question :
Existe-t-il une solution ou un contournement pour envoyer un fichier avec tRestClient, ou faut-il passer par un autre composant ?

Merci pour vos retours 

Labels (1)
  • REST

1 Solution

Accepted Solutions
Rahul_Kale
Support
Support

Hello anyxs,
 

Yes, this is a known limitation of TRESTClient/TRESTRequest. They are designed mainly for JSON/XML, not raw binary or proper multipart/form-data file uploads. There is no clean or reliable workaround in TRESTClient itself for sending files.

 

We recommend using TNetHTTPClient / THTTPClient.
These fully support:

  • multipart/form-data
  • application/octet-stream
  • File streams and binary data

View solution in original post

1 Reply
Rahul_Kale
Support
Support

Hello anyxs,
 

Yes, this is a known limitation of TRESTClient/TRESTRequest. They are designed mainly for JSON/XML, not raw binary or proper multipart/form-data file uploads. There is no clean or reliable workaround in TRESTClient itself for sending files.

 

We recommend using TNetHTTPClient / THTTPClient.
These fully support:

  • multipart/form-data
  • application/octet-stream
  • File streams and binary data