Skip to main content
Participant
January 26, 2018
Answered

How to extract a mid-string from #cfhttp.FileContent#?

  • January 26, 2018
  • 2 replies
  • 467 views

Hello!

I could see a string on the screen by <cfoutput> #cfhttp.FileContent# </cfoutput>.

But #cfhttp.FileContent# could not be handled as a string.

How can I extract a string from #cfhttp.FileContent#.

Thank you in advance!

Masaru

**********

<cfhttp method = "Get"  url="http://xxx.xxx.xxx" >

<cfoutput>

#cfhttp.FileContent#

</cfoutput>

**********

    This topic has been closed for replies.
    Correct answer okabe007

    I could solve the problem, just by using "GET" command with ".txt" file name.

    Thanks!

    <cfhttp

        method = "Get"

        url="http://xxxx.xxxx.xxxx"

        path="D:\home\xxx.xxx\wwwroot\xxxx\"

        file="XXXX.txt">

    2 replies

    Participant
    January 26, 2018

    You can parse response in cfhttp.FileContent depending upon the response type JSON/XML/Text

    okabe007AuthorCorrect answer
    Participant
    January 26, 2018

    I could solve the problem, just by using "GET" command with ".txt" file name.

    Thanks!

    <cfhttp

        method = "Get"

        url="http://xxxx.xxxx.xxxx"

        path="D:\home\xxx.xxx\wwwroot\xxxx\"

        file="XXXX.txt">