Hey guys, I need to make a HTTP GET in a page, but I need to use the
header X-Requested-With : XMLHttpRequest, but I have no idea how to do
this.
by the way I'm new in ruby.
···
--
Posted via http://www.ruby-forum.com/.
Hey guys, I need to make a HTTP GET in a page, but I need to use the
header X-Requested-With : XMLHttpRequest, but I have no idea how to do
this.
by the way I'm new in ruby.
--
Posted via http://www.ruby-forum.com/.
I think we need more info to help you. You need to make a GET *in* a
page but you need to do it in Ruby? I'm not sure you really mean that.
Is it that you need to issue a GET request from within a web page
(then look at AJAX, javascript), or is it that you wan to use Ruby to
perform that request within a script, for example?
If it's the last one, we might be able to help you if you tell us more about it.
Jesus.
On Tue, Dec 10, 2013 at 4:54 PM, Eduardo Nunes <lists@ruby-forum.com> wrote:
Hey guys, I need to make a HTTP GET in a page, but I need to use the
header X-Requested-With : XMLHttpRequest, but I have no idea how to do
this.
by the way I'm new in ruby.
"Jesús Gabriel y Galán" <jgabrielygalan@gmail.com> wrote in post
#1130261:
On Tue, Dec 10, 2013 at 4:54 PM, Eduardo Nunes <lists@ruby-forum.com> > wrote:
Hey guys, I need to make a HTTP GET in a page, but I need to use the
header X-Requested-With : XMLHttpRequest, but I have no idea how to do
this.
by the way I'm new in ruby.I think we need more info to help you. You need to make a GET *in* a
page but you need to do it in Ruby? I'm not sure you really mean that.
Is it that you need to issue a GET request from within a web page
(then look at AJAX, javascript), or is it that you wan to use Ruby to
perform that request within a script, for example?If it's the last one, we might be able to help you if you tell us more
about it.Jesus.
Yes, I want to use ruby to perform a request with that header, sorry for
my bad english.
--
Posted via http://www.ruby-forum.com/\.
You can use the stdlib class Net::HTTP, see here an example of setting
a header: Class: Net::HTTP (Ruby 2.0.0)
There also a number of gems to help with HTTP requests: mechanize,
httparty, etc, depending on what you want to do.
Jesus.
On Tue, Dec 10, 2013 at 5:01 PM, Eduardo Nunes <lists@ruby-forum.com> wrote:
"Jesús Gabriel y Galán" <jgabrielygalan@gmail.com> wrote in post
#1130261:On Tue, Dec 10, 2013 at 4:54 PM, Eduardo Nunes <lists@ruby-forum.com> >> wrote:
Hey guys, I need to make a HTTP GET in a page, but I need to use the
header X-Requested-With : XMLHttpRequest, but I have no idea how to do
this.
by the way I'm new in ruby.I think we need more info to help you. You need to make a GET *in* a
page but you need to do it in Ruby? I'm not sure you really mean that.
Is it that you need to issue a GET request from within a web page
(then look at AJAX, javascript), or is it that you wan to use Ruby to
perform that request within a script, for example?If it's the last one, we might be able to help you if you tell us more
about it.Jesus.
Yes, I want to use ruby to perform a request with that header, sorry for
my bad english.--
Posted via http://www.ruby-forum.com/\.
If I understood your problem correctly, maybe this gem could also be an
option:
2013/12/10 Jesús Gabriel y Galán <jgabrielygalan@gmail.com>
re also a number of gems to help with HTTP requests: mechanize,
httparty, etc, depending on what you want to
--
Thyago Barbosa Rodrigues [Natal-RN/Brasil]
"Who loves not wine, women and song,
remains a fool his whole life long"
(Martin Luther [Martinho Lutero], Teólogo Alemão)
"Phantasie ist wichtiger als Wissen, denn Wissen ist begrenzt." (Albert
Einstein)