Trucking All Http Request from a web page

Hi,

I am trying to capture a list of outgoing HTTP request from a website,
this HTTP request come from JavaScript events such as onLoad, onClick
and Ajax. In total I have about 20 requests going out and I want to be
able to capture all this in a ruby object so that I can examine exactly
what’s been sent from each request.

Let me know if there is a ruby gem which does this, I know Net/HTTP.
But so far I only been able to capture details of the main request that
is going out nothing else.

Thanks

Ja

On Thu, May 9, 2013 at 2:10 AM, Ja Tse [email protected] wrote:

I am trying to capture a list of outgoing HTTP request from a website,
this HTTP request come from JavaScript events such as onLoad, onClick
and Ajax. In total I have about 20 requests going out and I want to be
able to capture all this in a ruby object so that I can examine exactly
what’s been sent from each request.

Sorry, are you talking about capturing requests made to a third-party
server from your app, or responses from your app to requests from
a browser?

Because normally, web applications receive “requests”.

Sounds like the perfect scenario for a Proxy. Have you tried setting one
up?

Joel P. wrote in post #1108427:

Sounds like the perfect scenario for a Proxy. Have you tried setting one
up?

Hi Joe

No I haven’t done any proxy setting before how do you think I should go
about to set up ?

Hassan S. wrote in post #1108421:

On Thu, May 9, 2013 at 2:10 AM, Ja Tse [email protected] wrote:

I am trying to capture a list of outgoing HTTP request from a website,
this HTTP request come from JavaScript events such as onLoad, onClick
and Ajax. In total I have about 20 requests going out and I want to be
able to capture all this in a ruby object so that I can examine exactly
what’s been sent from each request.

Sorry, are you talking about capturing requests made to a third-party
server from your app, or responses from your app to requests from
a browser?

Yes, that’s exactly what I meant request sent from my app to third
party.

Because normally, web applications receive “requests”.

Well in my case I have outgoing traffic with query strings and I want to
be able to track them.

On Thu, May 9, 2013 at 9:35 AM, Ja Tse [email protected] wrote:

Yes, that’s exactly what I meant request sent from my app to third
party.

Because normally, web applications receive “requests”.

Well in my case I have outgoing traffic with query strings and I want to
be able to track them.

So why don’t you just save them at the time you’re sending them?

Google “Fiddler”. This isn’t a Ruby gem, but a standalone application,
but it’s what you want.

Could you draw a picture of what you’re talking about?

On Thu, May 9, 2013 at 10:27 PM, Bartosz Dziewoński
[email protected] wrote:

Google “Fiddler”. This isn’t a Ruby gem, but a standalone application,
but it’s what you want.

From the OP:
" In total I have about 20 requests going out and I want to be
able to capture all this in a ruby object"

Fiddler won’t help with the last part of the requirement…

I was referring to the Proxy pattern
http://en.wikipedia.org/wiki/Proxy_pattern

You can use this approach to add a layer to the existing process which
does what you need it to do and then continues as normal.

I don’t know enough about your current situation to give a detailed
answer, it’s just a direction you can start looking in.