Highlighted

How to setup cfhttpparam that takes multiple values?

Engaged ,
Oct 10, 2016

Copy link to clipboard

Copied

I'm a doing a json calls via a third party's API and in one of its url_hash paramters, they gave me this example.

json -- url_hash: { '$in' : ['office-365', 'office-excel', 'office-tutorials', 'office-products'] }

So here's my current http request.

<cfhttp url="https://app.example.com/api/head/category.json" method="get" timeout="15" throwonerror="false" proxyServer="webproxy.example.com" proxyport="8080">

  <cfhttpparam type="url" name="_authbykey" value="56a7d8c532131c40581235487">

  <cfhttpparam type="url" name="project_id" value="55c4ffd4567891c527e294fe6">

  <cfhttpparam type="url" name="limit" value="1"/>

  <cfhttpparam type="url" name="url_hash" value="#hash#"/>

  </cfhttp>

So, will line 5 of my code above work in this case? Or, do I  have to do something different?

Thank you.

Views

148

Likes

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

How to setup cfhttpparam that takes multiple values?

Engaged ,
Oct 10, 2016

Copy link to clipboard

Copied

I'm a doing a json calls via a third party's API and in one of its url_hash paramters, they gave me this example.

json -- url_hash: { '$in' : ['office-365', 'office-excel', 'office-tutorials', 'office-products'] }

So here's my current http request.

<cfhttp url="https://app.example.com/api/head/category.json" method="get" timeout="15" throwonerror="false" proxyServer="webproxy.example.com" proxyport="8080">

  <cfhttpparam type="url" name="_authbykey" value="56a7d8c532131c40581235487">

  <cfhttpparam type="url" name="project_id" value="55c4ffd4567891c527e294fe6">

  <cfhttpparam type="url" name="limit" value="1"/>

  <cfhttpparam type="url" name="url_hash" value="#hash#"/>

  </cfhttp>

So, will line 5 of my code above work in this case? Or, do I  have to do something different?

Thank you.

Views

149

Likes

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
Oct 10, 2016 0

Have something to add?

Join the conversation