Hi, I''m trying to make an application that periodical sending ''Post'' requests to another server and handle the response. I used the ''Live HTTP Headers'' plug-in to firefox to see which headers and parameters I needed for the response. POST /getResponse/ HTTP/1.1 Host: thatSite.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv: 1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Accept: text/xml,application/xml,application/xhtml+xml,text/ html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: sv,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Content-Type: application/x-www-form-urlencoded Referer: http://thatSite.com/home Content-Length: 51 Cookie: site_eng=0effedd96ae13cdfda226fd46ec978fd; PHPSESSID=09mluoduvmmh1bvjlg0hri81m5 Pragma: no-cache Cache-Control: no-cache a=191&b=202&c=201&d=206 My question is, how do I add all these headers to my request. I tried to make an array containing all the headers and parameters but it doesn''t work, no response at all nor failure. And I also want to remove all the standard headers that prototype uses so the request looks more real. Any help would be nice! Regards V --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Apr 18, 9:36 am, vermin <ggus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''m trying to make an application that periodical sending ''Post'' > requests to another server and handle the response. > > I used the ''Live HTTP Headers'' plug-in to firefox to see which headers > and parameters I needed for the response. > > POST /getResponse/ HTTP/1.1 > Host: thatSite.com > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv: > 1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 > Accept: text/xml,application/xml,application/xhtml+xml,text/ > html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 > Accept-Language: sv,en-us;q=0.7,en;q=0.3 > Accept-Encoding: gzip,deflate > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 > Keep-Alive: 300 > Connection: keep-alive > Content-Type: application/x-www-form-urlencoded > Referer:http://thatSite.com/home > Content-Length: 51 > Cookie: site_eng=0effedd96ae13cdfda226fd46ec978fd; > PHPSESSID=09mluoduvmmh1bvjlg0hri81m5 > Pragma: no-cache > Cache-Control: no-cache > a=191&b=202&c=201&d=206 > > My question is, how do I add all these headers to my request. I tried > to make an array containing all the headers and parameters but it > doesn''t work, no response at all nor failure. And I also want to > remove all the standard headers that prototype uses so the request > looks more real. > > Any help would be nice! > > Regards VAJAX requests can only be sent to the server upon which your page is located. Requests to other servers will need to be relayed by some server side scripting. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
it appears that you are making some kind of browser based bot, yes? first, the majority of those headers, you aren''t going to be able to strip out because they are produced by the browser, second Prototype doesn''t do cross-domain communication natively what you probably will have to do is make a server side proxy using cURL or some other technology (if you use a MS based server that is) and thus would allow you to configure (some) of those headers On Fri, Apr 18, 2008 at 9:36 AM, vermin <ggustav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hi, > > I''m trying to make an application that periodical sending ''Post'' > requests to another server and handle the response. > > I used the ''Live HTTP Headers'' plug-in to firefox to see which headers > and parameters I needed for the response. > > POST /getResponse/ HTTP/1.1 > Host: thatSite.com > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv: > 1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 > Accept: text/xml,application/xml,application/xhtml+xml,text/ > html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 > Accept-Language: sv,en-us;q=0.7,en;q=0.3 > Accept-Encoding: gzip,deflate > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 > Keep-Alive: 300 > Connection: keep-alive > Content-Type: application/x-www-form-urlencoded > Referer: http://thatSite.com/home > Content-Length <http://thatSite.com/homeContent-Length>: 51 > Cookie: site_eng=0effedd96ae13cdfda226fd46ec978fd; > PHPSESSID=09mluoduvmmh1bvjlg0hri81m5 > Pragma: no-cache > Cache-Control: no-cache > a=191&b=202&c=201&d=206 > > My question is, how do I add all these headers to my request. I tried > to make an array containing all the headers and parameters but it > doesn''t work, no response at all nor failure. And I also want to > remove all the standard headers that prototype uses so the request > looks more real. > > Any help would be nice! > > Regards V > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Fri, Apr 18, 2008 at 8:01 PM, blechler <lechler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > On Apr 18, 9:36 am, vermin <ggus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, > > > > I''m trying to make an application that periodical sending ''Post'' > > requests to another server and handle the response. > > > > I used the ''Live HTTP Headers'' plug-in to firefox to see which headers > > and parameters I needed for the response. > > > > POST /getResponse/ HTTP/1.1 > > Host: thatSite.com > > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv: > > 1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 > > Accept: text/xml,application/xml,application/xhtml+xml,text/ > > html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 > > Accept-Language: sv,en-us;q=0.7,en;q=0.3 > > Accept-Encoding: gzip,deflate > > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 > > Keep-Alive: 300 > > Connection: keep-alive > > Content-Type: application/x-www-form-urlencoded > > Referer:http://thatSite.com/home > > Content-Length: 51 > > Cookie: site_eng=0effedd96ae13cdfda226fd46ec978fd; > > PHPSESSID=09mluoduvmmh1bvjlg0hri81m5 > > Pragma: no-cache > > Cache-Control: no-cache > > a=191&b=202&c=201&d=206 > > > > My question is, how do I add all these headers to my request. I tried > > to make an array containing all the headers and parameters but it > > doesn''t work, no response at all nor failure. And I also want to > > remove all the standard headers that prototype uses so the request > > looks more real. > > > > Any help would be nice! > > > > Regards V > > AJAX requests can only be sent to the server upon which your page is > located. Requests to other servers will need to be relayed by some > server side scripting. > > > hi thanks for the email but i do not understand your email please can yoube more specific about your requirement.. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
On Apr 18, 5:17 pm, "Brian Williams" <brianw1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> it appears that you are making some kind of browser based bot, yes?Yeah exactly! And now I understand why it doesn''t work. I''m downloading cURL at the moment, do you guys have other ideas? Is it possible to make a simple http-request with (in my case) asp.net C# and change some of the headers, would that work? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---