Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
https
#1
Can you use https with IntPost? Any example

Thanks
#2
Don't remember, need to try. Instead of IntPost you can use functions of Http class.

Example
Code:
Copy      Help
ARRAY(POSTFIELD) a.create(2)
a[0].name="testtxt"; a[0].value="some text"; a[0].isfile=0
a[1].name="testfile"; a[1].value="$desktop$\test.gif"; a[1].isfile=1
Http h.Connect("www.xxx.com" "" "" 433) ;;433 is https port
str response
if(!h.PostFormData("form.php" a response)) end "failed"
out response
#3
Can you send a http header with it?
#4
Example
Code:
Copy      Help
if(!h.PostFormData("form.php" a r "User-agent: QM")) end "failed"
#5
For some reason i cannot get the example you wrote to work. According to the requests its trying to connect to:

example.com:443/test/test.php

This is causing qm to say server not found. I need it to connect to:

https://example.com/test/test.php

Is this possible?
#6
Use "example.com" with Connect. Use "test/test.php" with PostFormData.
#7
I changed it but it still appends :443 like

test.test.com:443/test/test.php

Also, the variable that is sent has a whole bunch of %22, %20 ext.. in the string? Any thoughts on why?
#8
PostFormData urlencodes the data and adds "Content-Type: application/x-www-form-urlencoded" header. The server should urldecode it.

Appending :port to server is alternative way to specify port.
#9
I understand, I need to post to the following with the syntax below:

https://example.test.com/john/testss.php

If i don't call it as above, the server won't respond. Is this possible? Thanks for all the help.
#10
Maybe there are hidden input fields that you don't send.
#11
Is there a way to post data as xml not x-www-form-urlencoded
#12
Needs editing Http.PostFormData and Http.Post functions. Make copies of them, edit these copies, and use them. In the first function, remove .escape(9) and change Post in this code:

Code:
Copy      Help
,,s.formata("%s%s=%s" iif(i "&" "") s1.escape(9) s2.escape(9))
,ret Post(action s responsepage headers)

In the second function, change the content type header. However I don't know what is the content type string for xml. And not sure the server supports it.


Forum Jump:


Users browsing this thread: 1 Guest(s)