View cfhttp request
Asked Answered
U

3

6

I would like to view the actual http request that gets sent via my cfhttp tag. What is the best tool to capture this?

Specially, I want to see exactly what headers and content are being sent.

Urchin answered 18/8, 2010 at 18:36 Comment(7)
possible duplicate of How to debug RESTful services?Enlarge
Unfortunately, I'm not running it locally. The page is being run from a web server that I don't have access to setup one of these tools. I didn't know if there was a way in ColdFusion to view a request before (or after) it was sent.Urchin
One roundabout way would be to point the http request (or duplicate it into a testing template) back to a debug template on the same CF Server that dumped everything to a file.Mccracken
@Jason, are you sure? those tools are mostly client side. You don't have access to client side? then how do you debug basic CFML codes?Enlarge
@Enlarge I can run those tools locally but they can't see the requests that are being made from my web server to another web server. They only see the request I make to my ColdFusion web server. That request does not contain the information I need.Urchin
@Edward How could I view that request with a ColdFusion page?Urchin
Just make a CF page that dumps the url scope, the form scope, and I guess, the CGI scope. You can then see what was in the url, what was posted (if its a post), and various other items. If the request is more complicated (like an xmlrpc or soap invocation) or you're into a more low level display , do what Stephen suggests as a solution, and dump getHttpRequestData().Mccracken
C
4

To expand on what Edward has said and to answer your question about how you can view a request on ColdFusion;

Create a page that simply dumps everything out from GetHttpRequestData().

Have a look at the livedocs on getHttpRequestData() for more information.

Cotinga answered 18/8, 2010 at 19:46 Comment(0)
H
0

Use Charles http proxy. Add the proyport and proxyhost attribute that points to your running instance of Charles. Caveat is that your machine will need to be reachable, and the port open for the server to reach.

Hyoscyamine answered 18/8, 2010 at 19:44 Comment(0)
I
0

I'd use sniffer if other side is also CF/Java based server http://kb2.adobe.com/cps/193/tn_19352.html

Irizarry answered 18/8, 2010 at 19:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.