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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to post parameters with thttprequest to a form by the post method?

Hi,
I would like to fill a form with the thttprequest component.
First step : i take the data in my database.
second step : I transform the data in a file. I can have sevral rows in the file.
Third step : I want to send the date with the thttprequest component in a form with the post method.
When i look in the forum, i just find, put your data in a file and it's ok. But i try everything, xml file, csv file, xml file with only one row, thttprequest configure with headers, but nothing works.
Could you help to find what i'm doing wrong.
How do i have to configure my file to send the data to the form ?
Thanks in advance,
Thibault
0683p000009MBK9.png
Labels (4)
5 Replies
Anonymous
Not applicable
Author

Hi,
In a GET request, the parameters are sent as part of the URL.
In a POST request, the parameters are sent as a body of the response, after the headers.
To do a POST with Http URL Connection, you need to write the parameters to the connection after you have opened the connection.
for exmaple:
for get method:
set the url like :
http://example.com/index.php?param1=a&param2=b&param3=c
for post method, set the header table like:
header key:value
Content-Length 0683p000009MAB6.pngaram1=a&param2=b&param3=c

Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
Thanks for your answer.
I still have a problem.
I try your solution (You can see it on the picture) but it doesn't work for me.
Maybe i'm not writing the parameters with the good syntax.
I try with the parameters in a txt file but it does nothing again.
I try with an xml file.
Could you look at the picture or at the submited files to help me to find the good syntax.
Thanks in advance for your help.
Thibault
0683p000009MBKJ.png 0683p000009MBKF.png 0683p000009MBF1.png
corocraft
Contributor
Contributor

Hi
I have the same problem. I need send a POST but in Headers don't know what is the sintax.
I tried with Header key = "Content-Length" and value = "value1=1020-1&value2=csmdefc" but i get the following error:
Starting job http_request at 10:27 11/04/2014.
connecting to socket on port 3670
connected
403 FORBIDDEN
disconnected
Anonymous
Not applicable
Author

Content-Length as key expect an integer value and not another key-value pair.
Why do you want to send the parameter Content-Length? Usually this attribute is part of the response!
Anonymous
Not applicable
Author

Hi  @lli et al.,

 

Is there an easy way to pass the value "talend" to the p_text parameter as screen shot below?

Works on the top screen shot: "http://centos6/home/inserts.darkdata?p_text=talend" 

 

Errors on the bottom screen shot trying to pass as a parameter.

 

Apologize in advance for the Friday interruption and missing the obvious.

AR

WORKS HERE!

0683p000009M2EE.png

 

ERRORS HERE!

0683p000009M2Es.png