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

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tHttpRequest 400 bad request

Hello,
I am using tHttpRequest to post a file to a URL. But somehow I always get 400 bad request error.
I tried to post the same file by using Postman, it works fine.
Can anyone give me any idea on what may be wrong for me by using talent 6.1?
Thanks!
 

Labels (2)
5 Replies
Anonymous
Not applicable
Author

You will need to show us your thttprequest configuration and give us some information about the service you are trying to make use of.
Anonymous
Not applicable
Author

This is what I did. It is very simple, just post an xml document to a URL, and get a response. But I always get 400 bad request by using talend, even I leave the "post parameters from file" as blank. 




0683p000009MFjq.png 0683p000009MFjv.png
Anonymous
Not applicable
Author

"Post parameters from file" is for parameters for your REST call, not for the file that you wish to send. It is difficult to talk you through doing this without understanding the webservice you are communicating with. However I suspect that you *may* find an easy way around this by using the tFileFetch component, using the "Upload File" option in the Advanced Settings. Alternatively you could try the tRest component. Read your file in as a byte array and place that byte array in the HTTP Body. The guides for these components are below....

https://help.talend.com/search/all?query=tFileFetch

https://help.talend.com/search/all?query=tREST
Anonymous
Not applicable
Author

Thank you so much, rhall_2.0!
tRest works well for me. 
I used tHttpRequest to do this kind of job before, I didn't see any problem. But this one is different. As you mentioned, this web service may be different from the others.
Anyway, thanks a lot for your time and help.
Anonymous
Not applicable
Author

Glad I could help 🙂