Anybody noticed any oddities with cfhttp making a ...
# adobe
s
Anybody noticed any oddities with cfhttp making a bunch of calls for one call? I have a call that works the first time, but then, according to the http.log, it repeats the call multiple times, triggering rate limiting on the external API. This worked fine before this last update, but I don't know if it's because UPS changed something, or there's an issue with cfhttp. (This log is from a test page with a single call on it.)
Copy code
"Information","ajp-nio-127.0.0.1-8022-exec-6","06/05/25","17:34:32","","Starting HTTP request {URL='<https://onlinetools.ups.com/ups.app/xml/Rate>', method='POST'}"
"Information","ajp-nio-127.0.0.1-8022-exec-6","06/05/25","17:34:33","","HTTP request completed  {Status Code=200 ,Time taken=917 ms}"
"Information","ajp-nio-127.0.0.1-8022-exec-5","06/05/25","17:34:34","","Starting HTTP request {URL='<https://onlinetools.ups.com/ups.app/xml/Rate>', method='POST'}"
"Information","ajp-nio-127.0.0.1-8022-exec-5","06/05/25","17:34:34","","HTTP request completed  {Status Code=429 ,Time taken=123 ms}"
"Information","ajp-nio-127.0.0.1-8022-exec-5","06/05/25","17:34:34","","Starting HTTP request {URL='<https://onlinetools.ups.com/ups.app/xml/Rate>', method='POST'}"
"Information","ajp-nio-127.0.0.1-8022-exec-5","06/05/25","17:34:34","","HTTP request completed  {Status Code=429 ,Time taken=84 ms}"
"Information","ajp-nio-127.0.0.1-8022-exec-10","06/05/25","17:34:36","","Starting HTTP request {URL='<https://onlinetools.ups.com/ups.app/xml/Rate>', method='POST'}"
"Information","ajp-nio-127.0.0.1-8022-exec-10","06/05/25","17:34:36","","HTTP request completed  {Status Code=429 ,Time taken=105 ms}"
"Information","ajp-nio-127.0.0.1-8022-exec-10","06/05/25","17:34:36","","Starting HTTP request {URL='<https://onlinetools.ups.com/ups.app/xml/Rate>', method='POST'}"
"Information","ajp-nio-127.0.0.1-8022-exec-10","06/05/25","17:34:36","","HTTP request completed  {Status Code=429 ,Time taken=98 ms}"
"Information","ajp-nio-127.0.0.1-8022-exec-2","06/05/25","17:34:37","","Starting HTTP request {URL='<https://onlinetools.ups.com/ups.app/xml/Rate>', method='POST'}"
"Information","ajp-nio-127.0.0.1-8022-exec-2","06/05/25","17:34:37","","HTTP request completed  {Status Code=429 ,Time taken=104 ms}"
"Information","ajp-nio-127.0.0.1-8022-exec-2","06/05/25","17:34:37","","Starting HTTP request {URL='<https://onlinetools.ups.com/ups.app/xml/Rate>', method='POST'}"
"Information","ajp-nio-127.0.0.1-8022-exec-2","06/05/25","17:34:37","","HTTP request completed  {Status Code=429 ,Time taken=94 ms}"
d
If you haven't already, as a debugging step, you might try adding a cflog statement right before your CFHTTP call to see if for some reason your code is running multiple times. If the cflog entry isn't appearing multiple times, then at least you know for a fact the problem is with CFHTTP.
s
Good point. I’ll try that. I think I’ll make a wrapper for cfhttp for all calls in the app.