#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Rockville, MD
    Posts
    1
    Rep 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
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Washington DC, USA
    Posts
    156
    Rep Power
    13
    From...
    http://livedocs.macromedia.com/coldf...94.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?

IMN logo majestic logo threadwatch logo seochat tools logo