• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Structure (Minus Sign) cfhttp

New Here ,
Dec 06, 2006 Dec 06, 2006

Copy link to clipboard

Copied

Hey all.

After doing a cfhttp I am now trying to dump the cfhttp scope. The problem is one of the struct variable names is Content-Type.

So coldfusion is treating the (-) minus as a maths function. Returning the error: Element RESPONSEHEADER.CONTENT is undefined in CFHTTP. When doing:

<cfdump var="#cfhttp.Responseheader.Content.Type#">

Anyone know a way around this?

Thanks
Adam
TOPICS
Advanced techniques

Views

382

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 06, 2006 Dec 06, 2006

Copy link to clipboard

Copied

try this #cfhttp["Responseheader"]["Content-Type"]#

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 06, 2006 Dec 06, 2006

Copy link to clipboard

Copied

LATEST
Use bracket-notation:
<cfdump var="#cfhttp.Responseheader["Content-Type"]#">

Use Struct-functions:
<cfdump var="#StructFind(cfhttp.Responseheader, "Content-Type")#">

Do not use Evaluate() for this. Evaluate() is vicious and should not be used except in very rare special occasions ...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation