![why](/static/img/x1mno0Ukhc-600.jpeg)
A user just asked:
I need to pass my array to a webserver. But somehow, the array passed with cfhttp throws an error. Please help
You can not pass a structure or an array in a URL as they are complex values and Coldfusion does not have a way to convert them to simple string values (this is what you need to pass in a URL).
The only way to pass complex values is to serialize the Coldfusion struct or array for the URL. Fortunately, Coldfusion has a built in function called “SerializeJSON” to create a simple string. On the other hand, you can convert the simple string back to a struct or array with “DeserializeJSON”.
Here is a simple example how to pass a 2 dimensional array with cfhttp: