Skip to main content
BreakawayPaul
Inspiring
June 30, 2011
Question

Can chttp tags be nested?

  • June 30, 2011
  • 1 reply
  • 1977 views

Can you nest a <cfhttp> tag inside another one?  And if so, when I reference cfhttp.filecontent am I getting it from the "closest" <cfhttp> tag that I called?

    This topic has been closed for replies.

    1 reply

    Owainnorth
    Inspiring
    June 30, 2011

    Ooh, I'm first.

    1 - Have you tried it?

    2 - if Yes, what happened?

    3 - If no, why on earth not?

    BreakawayPaul
    Inspiring
    June 30, 2011

    Yes, I've tried it, but it seems like cfhttp.filecontent still contains the results from the original <cfhttp> tag.  So it's either 1) my coding error, or 2) that they can't be nested.  I figured I'd get item 2 verified before digging through my code.

    Inspiring
    June 30, 2011

    I emailed a reply earlier, but apparently the donkey cart it is riding in on has not arrived yet...

    I am curious why you want to nest the tags. What do you hope to gain from nesting that cannot be achieved (or achieved as easily) without it?

    >> cfhttp.filecontent still contains the results from the original <cfhttp> tag.

        What happens if when using the localized "result" attribute instead?