One Star

tHttpRequest error 400 Bad Request

Hi all,
as shown in figure, I  use tFileInputRaw to extract the JSON from file and send it to tHttpRequest component in order to make the request.
But the Job returns "400 Bad Request".
I tried the JSON and HttpRequest with Advanced Rest Client and i works. Why doesn't work with in Talend?
Thanks all.
6 REPLIES
Moderator

Re: tHttpRequest error 400 Bad Request

Hi,
Have you tried to use "post parameters from file" to see if it works?
Please see the related scenario "Sending a POST request from a local JSON file" in document TalendHelpCenter:tHttpRequest
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tHttpRequest error 400 Bad Request

Hi,
I already tried this scenario as shown in the figures.
But I get this error: "Cannot write output after reading input."
Why? Can you help me?
Thanks.
One Star

Re: tHttpRequest error 400 Bad Request

can someone give me a suggestion?
thanks
One Star

Re: tHttpRequest error 400 Bad Request

I'm sure that the JSON is correct because I tried it with Advanced Rest Client and it works.
this is the JSON.
{ 	"owner_org":"aaf93c42-",
"name":"TEst dataset",
"author":"organization",
"url":"http://www.organization.my.it/",
"notes":"this is a testing dataset",
"title":"Dataset",
"author_email":"organizations.it",
"extras":
}

Replying the example scenario with Talend Studio 5.5.1, I get "400 Bad Request", while with Talend Studio 5.6.0, I get "Cannot write output after reading input."
One Star

Re: tHttpRequest error 400 Bad Request

Hi,
which is the format of the data contained in post parameters file in tHttpRequest?
Someone can make an example?
thanks
One Star

Re: tHttpRequest error 400 Bad Request

Hi Team,
I am facing the same issue while doing GET Call with the URL . what are the possible cause for this ?
Regards,
Arihant