|
#1
|
|||
|
|||
HTTP Post in 7.5b
I have setup an HTTP action
Put: Post form data Get: Get to macro URL: myurl.php Macro: PostResponse Do not escape special characters: not checked Transfer type: ASCII Form Data: action=3&program_date=07/06/2010 Logging: All + Hex dump -- The php script I'm posting to is not getting the Form Data. The Hex dump is not showing the Form Data. Any suggestions? [correction] I didn't look high enough, the data did get sent. The PHP script isn't seeing the data though. Last edited by TracyP; 07-06-2010 at 10:15 AM. |
#2
|
|||
|
|||
I'm not sure. Testing the attached sample w/ 7.5b on Windows XP SP3 produces the expected output of
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head> <title>Echoing submitted form data</title> </head> <body> <h1 style="font-size:1.2em">Echoing submitted form data</h1> <table border="1" cellspacing="0"> <tr><th align="left" nowrap><tt>Comments</tt></th><td nowrap><tt>xyz</tt></td></tr> <tr><th align="left" nowrap><tt>box</tt></th><td nowrap><tt>yes</tt></td></tr> </table> <p>Processed 2010-07-06T16:01Z </p> </body> </html> http://www.kinook.com/Forum/showthre...?threadid=3044 |
#3
|
|||
|
|||
I downloaded Fiddler to discover the problem. It appears when posting data the Content-Type header needs to be set to 'application/x-www-form-urlencoded'.
This worked in the 6.x version I was using prior to upgrading the system and software. Watching what is posted via VBP Code:
POST http://powerchurchsoftware.com/test/index.php HTTP/1.1 Host: powerchurchsoftware.com Content-Length: 19 action=3&version=A0 Code:
HTTP/1.1 200 OK Date: Tue, 06 Jul 2010 22:34:18 GMT Server: Apache X-Powered-By: PHP/5.2.13 Vary: Accept-Encoding Content-Length: 13 Content-Type: text/html array(0) { } Code:
POST http://powerchurchsoftware.com/test/index.php HTTP/1.1 Host: powerchurchsoftware.com Content-Length: 19 Content-Type: application/x-www-form-urlencoded action=3&version=A0 Code:
HTTP/1.1 200 OK Date: Tue, 06 Jul 2010 22:45:51 GMT Server: Apache X-Powered-By: PHP/5.2.13 Vary: Accept-Encoding Content-Length: 77 Content-Type: text/html array(2) { ["action"]=> string(1) "3" ["version"]=> string(2) "A0" } |
#4
|
|||
|
|||
Add a value that requires encoding (spaces or special characters, i.e., action=3&version=A0
&x=a b). The version of the third-party networking component used in v7 only adds the Content-Type header if there are values that require encoding. |
#5
|
|||
|
|||
OK, added an extra variable and the array is filled in.
Thank you. |
#6
|
|||
|
|||
Also, in v7.6, you can explicitly set header values (Options tab).
|
#7
|
|||
|
|||
I like that idea better.
Thanks for the new release. |
Thread Tools | |
Display Modes | Rate This Thread |
|
|