Copy link to clipboard
Copied
Hi,
I am facing issue with <cfhttpparam> tag.
<cfhttpparam
type="URL"
name="auth_token"
value="#strJsonData.result.authToken#"
encoded="false"
/>
Here the value send strips new line because of which on the other end i am not able to fetch data w.r.t that value
Thanks and Regards
Vikrantraje
Copy link to clipboard
Copied
It is unclear what you mean. Did you attempt to get the value of URL.auth_token after a cfhttp post? Could you please explain what you did, what you expected and what actually happened?
Copy link to clipboard
Copied
Hi BkBk,
1)Got URL.auth_token dynamically calling a service
2)Made another service to fetch details passing auth_token.
3)The problem lies when the service producer receives auth_token, its different from that which was send during 1st call .ie
auth_token during 1st service calls and later auth_token defer in "\n"(new line) character.
Hence it is certain that the when i send auth_token using <cfhttp> tag, it strips new line character and send auth_token.Why?
Copy link to clipboard
Copied
Thanks for the explanation. <cfhttpparam type="URL"> sends data as key-value pairs appended to the URL. I would expect ColdFusion to automatically url-encode the information.
But you have set encoded="false". Hence my suggestion that you should test by deleting that attribute.
Copy link to clipboard
Copied
Exactly..But i tried that..encoded attribute has no effect.
I think i need to handle it at web service producer end.
Copy link to clipboard
Copied
vikrantn20740057 wrote:
Exactly..But i tried that..encoded attribute has no effect.
It was worth a try, but we shouldn't read much into it. After all, the documentation tells us the attribute is ignored.
I think i need to handle it at web service producer end.
Yes, I, too, am curious to know whether the problem happens before or during the web service call. Test by displaying or logging the value before and after the call, and comparing.
Copy link to clipboard
Copied
Finally i had to handle it on service producer side.The <chttp> tag strips new line irrespective of encoding flag