ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 24th, 2003, 02:44 PM
aerwin aerwin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Rockville, MD
Posts: 1 aerwin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Please help student with CFHTTPRequest in CF5

Hi,

My question to anyone is did MM update this function in MX or left it alone? I am using the CF5 Developer Server for development and the function works but all of what I read mentions it as a new function in MX.

Also:

I am attempting to use the function and can not get the content string back but I get a content_length of the data that I sent to the cfm file.

My code is:

<cfset x = GetHttpRequestData()>
<cfset xdata ="">
<cfloop collection = #x.headers# item = "http_item">
<cfset xdata = "#xdata#<record item='#xmlformat(http_item)#' value='#xmlformat(StructFind(x.headers, http_item))#' />">
</cfloop>
<cfoutput><cfcontent type="text/xml"><?xml version='1.0'?><some>#xdata#<content value='#x.content#' /><method value='#x.method#' /></some></cfoutput>

The response I get is always:

<?xml version='1.0'?><some><record item="CACHE_CONTROL" value="no-cache" /><record item="CONTENT_LENGTH" value="71" /><record item="CONTENT_TYPE" value="application/x-www-form-urlencoded" /><record item="COOKIE" value="CFID=1; CFTOKEN=26067650" /><record item="HOST" value="127.0.0.1" /><record item="USER_AGENT" value="Shockwave Flash" /><content value="" /><method value="GET" /></some>

Before you suggest that I upgrade to MX for CF or Flash, I am a student and can't afford the 1500 to upgrade. But I am just wondering why I would be getting all of this info back with a content_length of 71 but no content. Can I not access the content?

Alex
Student, Montgomery College Rockville MD

Reply With Quote
  #2  
Old November 19th, 2003, 07:39 PM
cliffyman cliffyman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Washington DC, USA
Posts: 156 cliffyman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 26 m 7 sec
Reputation Power: 13
Send a message via AIM to cliffyman
From...
http://livedocs.macromedia.com/cold...s94.htm#1955092[/url]

content
Raw content from the form submitted by the client, in string or binary format. For content to be considered string data, the FORM request header "CONTENT_TYPE" must start with "text/" or be special case "application/x-www-form-urlencoded". Other types are stored as a binary object.

I'm not 100% sure on this one, but it makes reference to the content being retrieved via a form (presumably the POST method)but your method is actually GET. Can you try your script by invoking it via POST?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Please help student with CFHTTPRequest in CF5

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap