Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello. I have a working CURL command which I'm struggling to replicate in Talend (6.5.1).
The working command is : curl -i -X POST -u username:'password' --data-binary
'@/usr/local/workfiles/import.csv' -H Content-Type:text/plain 'https://xxxxx.net/xxxxxx'
- I've tried a tsystem which results in a 401 error (Unauthorized)
- I've also tried a thttprequest which results in a: "message" : "No OpenID authorization header was supplied", "http_status_code" : 401" .
Or a 500 if I mess with the username and password.
- I've also tried a tFleFetch which also results in a 401 (unauthorized).
I'm unsure if I should be passing the username and password as a header (e.g Authorization = username:'password') or as separate headers (authMethod = Basic, authUsername = username, authPassword = 'Password'). Should the credentials be in the "Need Authentication" box in the tFileFetch and thttprequest.
Could anyone possibly help with this? Screenshots would also be fantastic.
Many thanks.
I finally complete this job using a tRest component.
I failed using a tFileFetch and always received a 400 error. I managed with a tHTTPRequest in the same way as the tRest.
I think my problems were because I was not reading the file as a byte array. Still not sure what this means but read somewhere that it was required.
I also was unsure about converting the username and password to bas64 string. It was required in this case.
Hello,
Are your CURL post command running fine in command prompt?
Best regards
Sabrina
I finally complete this job using a tRest component.
I failed using a tFileFetch and always received a 400 error. I managed with a tHTTPRequest in the same way as the tRest.
I think my problems were because I was not reading the file as a byte array. Still not sure what this means but read somewhere that it was required.
I also was unsure about converting the username and password to bas64 string. It was required in this case.