开发者

Couldn't make POST request from iPhone to ColdFusion API

开发者 https://www.devze.com 2023-03-11 21:50 出处:网络
I am having a strange problem while making an application in iPhone. The problem is in making a POST request to the server API in ColdFusion. We have two servers: one is for Testing and other for Prod

I am having a strange problem while making an application in iPhone. The problem is in making a POST request to the server API in ColdFusion. We have two servers: one is for Testing and other for Production. The app works perfectly on the Testing server, but whe开发者_如何学运维n we do a POST request in Production server the API couldn't read the request variable and gives error as Element xxxxx is undefined in ATTRIBUTES, but actually it is there. One reason could be different User-Agents, but after trying many combinations it does not work.

Any help would be very appreciated.


I don't understand why you're talking about different user-agent? It's iPhone to test server or iPhone to production server, no? Is the configuration exactly the same including the Application.cfc (or Application.cfm)?

Web app or native app calling cfc's?


I don't think user-agents make any difference. Try to submit request directly through browser to make sure it is really working. Best way to do that NSLog url request and paste it in browser.


I figured out the problem. It was the "LINK" I was using. The API worked with adding "www" to the link, where as I was using the link without "www". Hope it helps someone.

Thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号