That looks like what I'm looking for, I'll try it and see.
Thanks
On Feb 16, 2004, at 5:36 PM, Scott Cadillac wrote:
Hi Bryan,
Sorry, your bit of Witango code didn't show up in my Mail Client for some
reason, but I saw it in Ben's reply.
Like Ben said, use of the POSTARGS attribute specifies HTTP POST (not shown in your CF debugging), but if CF wants a specific "Content-Type" specified (which is an optional HTTP spec with Requests), then do this little trick:
<@URL location="http://www.mydomain.com/post_to_me.cfm" postargs="state=FL" USERAGENT="Witango <@VERSION><@CRLF>Content-Type: application/x-www-form-urlencoded">
Notice the <@CRLF> in USERAGENT? This inserts a carriage-return/line-
feed, which is all that separates HTTP header properties. Doing this, you
can add any number of extra HTTP properties.
Hope this is what you're looking for. Cheers....
Scott Cadillac, 403-281-6090 ~ [EMAIL PROTECTED] ------------ XML-Extranet ~ http://xmlx.ca ~ http://forums.xmlx.ca Well-formed Programming in C# .NET, Witango, MSIE and XML ------------ Witango ~ http://witango.org EasyXSLT ~ http://easyxslt.ca IIS Watcher ~ http://iiswatcher.ca ------------
-----Original Message----- From: "Ben Johansen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Date: Mon, 16 Feb 2004 17:22:48 -0500 Subject: RE: Witango-Talk: @URL problems
You need to use the POSTARGS or POSTARGARRAY attribute of @URL
Excerpt from @URL Docs
"When the POSTARGS or POSTARGARRAY attribute is present, the type of
HTTP request issued by the <@URL> meta tag changes to POST from
GET"
Ben Johansen - http://www.pcforge.com Authorized Witango & MDaemon Reseller Available for Witango Developement
-----Original Message----- From: Bryan Hughes [mailto:[EMAIL PROTECTED] Sent: Monday, February 16, 2004 5:04 PM To: [EMAIL PROTECTED] Subject: Witango-Talk: @URL problems
I'm trying to post information to a ColdFusion .cfm page using the @URL
tag but for some reason the ColdFusion is not recognizing the HTTP
content as POST arguments.
I created a simple ColdFusion page to to display the HTTP headers, HTTP
content, and value of a form/post argument.
------ post_to_me.cfm ------ <cfparam name="form.state" default=""> <cfoutput> <cfdump var="#GetHTTPRequestData().headers#"> ----- -----<br> #GetHTTPRequestData().content#<br> ----- -----<br> state = #form.state#<br> ----------------------------------
I tried three different methods of posting once just with a form in a web page, then with CURL, and finally with the @URL tag in Witango.
These are the responses I received for each post type:
Safari web page through html form. struct
ACCEPT */*
ACCEPT-ENCODING gzip, deflate;q=1.0, identity;q=0.5, *;q=0
ACCEPT-LANGUAGE en, ja;q=0.92, ja-jp;q=0.96, fr;q=0.88, de-de;q=0.85, de;q=0.81, es;q=0.77, it-it;q=0.73, it;q=0.69, nl-nl;q=0.65, nl;q=0.62, sv-se;q=0.58, sv;q=0.54, no-no;q=0.50, no;q=0.46, da-dk;q=0.42, da;q=0.38, fi-fi;q=0.35, fi;q=0.31
CONNECTION close
CONTENT-LENGTH 22
CONTENT-TYPE application/x-www-form-urlencoded
COOKIE CFID=4034; CFTOKEN=27864451; Witango_UserReference=0A275D063CA9A8E64030D627
HOST www.mydomain.com
REFERER http://www.mydomain.com/mvr/sendform.html
USER-AGENT Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125
----- ----- state=FL&Submit=Submit ----- ----- state = FL
CURL command curl.exe -d "state=FL" http://www.mydomain.com/post_to_me.cfm
ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
CONTENT-LENGTH 8
CONTENT-TYPE application/x-www-form-urlencoded
HOST www.mydomain.com
PRAGMA no-cache
USER-AGENT curl/7.11.0 (win32) libcurl/7.11.0 zlib/1.1.4
----- ----- state=FL ----- ----- state = FL
@URL location="http://www.mydomain.com/post_to_me.cfm" postargs="state=FL" struct
ACCEPT */*
CONTENT-LENGTH 8
HOST www.mydomain.com
----- ----- state=FL ----- ----- state =
@URL doesn't pass as much header information, especially no the Content-Type header.
Is there a way to set extra header parameters besides from, and
useragent? Or does anyone have any other ideas why @URL is not working?
Attached are the sample files
______________________________________________________________________ _
_
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
_______________________________________________________________________ _
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
