Return JSON data in response in ColdFusion -


i'm working in icims api. need return json data , specific data in header in cfm page call icims server.

here response should be:

response work flow status change push event platform:

http/1.1 303 see other location: http://xx.xx.xx.xx:8085/selectpackage?systemhash=101 content-type: application/json { "usermessage":"confirm or modify package.", } 

thanks in advance.

answer:

> <cfset contentstring = '{"usermessage": "confirm or modify package."}' > /> >  > <cfheader name="location" > value="http://xx.xx.xx.xx:8085/selectpackage?systemhash=101" /> >     <cfcontent type="application/json" variable="#tobinary( tobase64( contentstring ) )#" /> 

<cfheader      statuscode = "303"     statustext = "see other">  <cfheader      name="location"      value="http://xx.xx.xx.xx:8085/selectpackage?systemhash=101">  <cfheader      name="content-type"      value="application/json">  <cfset foo = structnew()> <cfset foo["usermessage"] = "confirm or modify package.">  <cfoutput>#serializejson(foo)#</cfoutput>   

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -