Displaying 20 results from an estimated 30000 matches similar to: "Query string based on the selection in HTTP POST"
2006 Nov 04
0
Net::HTTP.post_form got 200 but no INSERT INTO. How come? How to fix this?
Hello,
I''m playing around with net/http and open-uri Ruby Libraries.. I''m
trying to post to my own rails simple new action method.
Here''s my irb :
irb(main):013:0> res =
Net::HTTP.post_form(URI.parse("http://localhost:3002/blog2/new"),
{"commit" => "Save",
"signature_id" => "", "signature_content"
2008 Jan 14
3
Reading HTTP Request parameters
Hello
I''ve a client which send this request to a mongrel HTTPHandler :
res=Net::HTTP.post_form(URI.parse(''http://localhost:3000/test''),{"a"=>1,"b"=>2})
But in the handler I can''t read the parameters one by one, I can read
the entire String only :
class Serveur
class MyHandler < Mongrel::HttpHandler
def process(req, resp)
2006 Mar 19
1
Sending post request with post_form
Basically I have a controller with this:
@lang = params[''lang''] || ''en''
@errors = request.raw_post
@feed_stats =
Net::HTTP.post_form(URI.parse("http://www.google.com/tbproxy/spell?lang="
+ @lang), @errors)
render :text => @feed_stats
However whenever I run this I get an error message:
undefined method `post_form'' for Net::HTTP:Class
2010 May 17
2
"end of file" error for "net/https"
Hi,
I have written following code:-
It is working fine for http protocol. But whenever I am doing for https
I getting an error "end of file reached".
Can anyone tell me what is wrong with the code?
def email_to_friend
require ''net/http''
require "net/https"
require ''uri''
#res =
2009 Sep 25
0
WWW::Mechanize and Rails console not playing well
I can run this code just fine in irb, but when I run it in rails
script/console, I get an error:
>> res = agent.submit(search_form, search_form.buttons.first)
ArgumentError: one hash required
from /home/jwoods/NetBeansProjects/activista/vendor/rails/
actionmailer/lib/../../actionpack/lib/../../activesupport/lib/
active_support/core_ext/string/interpolation.rb:85:in `%''
2007 Jun 12
1
alias_method_chain and Class methods (a Ruby question)
Hello list,
I am trying to override the post_form method of Net::HTTP so that it
does something before actually doing the post. I tried the following
in environments/development.rb
module Net
class HTTP
alias_method_chain :post_form, :intercept
def post_form_with_intercept(url, params)
# Do something before post
logger.info(''About to post at
2007 Jul 06
0
Removing One Element From a Serialized Form
Hi all,
I''m trying to serialize a form with the exception of one specific
element.
Serializing the form in a hash (without pulling out specific elements)
works:
<li>
<%= link_to_remote ''(Save)'', {:url => post_path(@post), :with => "$
(''post_form'').serialize(true)" }, :method => :put %>
</li>
The generated code
2016 Feb 20
1
Building a http query string including SMBIOS Serial Number to load a specific kernel
On Fri, Feb 19, 2016 at 3:40 PM, Geert Stappers via Syslinux
<syslinux at zytor.com> wrote:
> On Fri, Feb 19, 2016 at 06:07:15PM -0200, Leandro Becker via Syslinux wrote:
>> Hello folks,
>>
>> There is a way to get the system serial number from SMBIOS and pass it
>> as HTTP query string to get the kernel and initrd?
>> Something like this:
>>
>>
2011 Aug 19
1
How to post a file via HTTP as multipart/form-data to Facebook?
I would like to post a new photo to a user using `Net::HTTP::multipart`
from a Heroku application to Facebook.
I have the following JSON object:
{"message"=>"My message",
"image"=>#<ActionDispatch::Http::UploadedFile:0x00000004242490
@original_filename="neEZYMAnBI.jpg",
@content_type="application/octet-stream",
2016 Feb 19
0
Building a http query string including SMBIOS Serial Number to load a specific kernel
On Fri, Feb 19, 2016 at 06:07:15PM -0200, Leandro Becker via Syslinux wrote:
> Hello folks,
>
> There is a way to get the system serial number from SMBIOS and pass it
> as HTTP query string to get the kernel and initrd?
> Something like this:
>
> LABEL OS Download
> MENU LABEL Clonezilla
> MENU INDENT 1
> KERNEL
2016 Feb 22
0
Building a http query string including SMBIOS Serial Number to load a specific kernel
"Leandro Becker" <Lbecker at positivo.com.br> writes:
> Tryied, but seems that command line does not support loading kernel
> using http :(
> Thanks anyway.
Works fine for me with lpxelinux.0. String concatenation is .. though,
so fix that mistake of mine like
sl.run_command ("http://192.168.10.10/kernel.php?SN=" . serial . "...")
--
Regards,
Feri.
2007 Nov 13
2
Query an Access database based on a date attribute (Tudor Bodea)
Tudor Bodea asked:
>In this context, I try to get all the records for which market is atl-bos,
>competitor is delta and dd is 2007-11-20 (first record above). To do this I used
>># channel <- odbcConnectAccess("test.mdb")
>>res <- sqlQuery(channel, "select * from test_table where market = 'atl-bos'
>>and competitor = 'delta' and dd =
2010 Sep 01
4
NoMethodError: undefined method `force_encoding' for "Conten
Hi everyone!
Im trying to install mechanizer from
http://github.com/tenderlove/mechanize.
I`ve clone the project into /tmp folder. When I do rake inside the
folder /tmp/mechanizer it gives me this error:
mac159180:mechanize renatosis$ rake
(in /private/tmp/mechanize)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w
-Ilib:bin:test:. -e ''require "rubygems";
2009 Jun 05
1
Slow/unpredictive response of post_form from rails lib
Hi friends,
I''m facing a very strange problem...
I consume a webservice from within my rails app. I''ve written a thin
wrapper around the webservice using Net::HTTP.post_form
However, when calling the API from within my controllers, the API calls
randomly fail, complaining about timeout.
But - when I wrote a simple iterative test (500 iterations), calling the
same webservice
2016 Feb 19
6
Building a http query string including SMBIOS Serial Number to load a specific kernel
Hello folks,
There is a way to get the system serial number from SMBIOS and pass it
as HTTP query string to get the kernel and initrd?
Something like this:
LABEL OS Download
MENU LABEL Clonezilla
MENU INDENT 1
KERNEL http://192.168.10.10/kernel.php?type=kernel (
http://myserver/kernel.php?SN=SMBIOS_SERIAL_NUMBER&type=kernel
)&SN=SMBIOS_SERIAL_NUMBER
APPEND
2010 Oct 31
1
Rails application Webservices
hi all,
I have a rails application at http://electric-sky-98.heroku.com/products
require ''net/http''
require ''uri''
res = Net::HTTP.get_response(URI.parse(''http://electric-
sky-98.heroku.com/products.xml''))
puts res.body
the above code gave me the xml file below:
<?xml version="1.0"
2007 Nov 13
1
R: Query an Access database based on a date attribute
It seems that Access needs that you surround the dates with a # symbol.
You probably need something like.
res <- sqlQuery(channel, "select * from test_table where market = 'atl-bos'
and competitor = 'delta' and dd = #2007-11-20#")
Hope this helps,
Stefano
-----Messaggio originale-----
Da: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org]Per
2007 Nov 12
2
Query an Access database based on a date attribute
Dear useRs,
I would like to query an Access database through R based on a date attribute
but, unfortunately, I fail to do so. For example, the table test_table of the
test.mdb looks like:
ID cd market competitor dd price
1 1 2007-11-20 atl-bos delta 2007-11-20 210
2 2 2007-11-20 atl-bos delta 2007-11-21 190
3 3 2007-11-20 atl-bos delta 2007-11-22
2006 Apr 29
0
Trouble with firefox and AJAX
I''ve been creating my own message board in rails as a learning
exercise. I''m currently trying to implement posting using AJAX, so the
topic page as a whole doesn''t need reloading.
What I''ve written works as epected in IE6 and Safari, but the AJAX
call fails silently in Firefox 1.5 -- although the server has logged
the request, the "success" callback
2012 Feb 16
3
Mechanize::ResponseCodeError: 500
> Excuse me if my issue is a little bit application-specific. I need
> Mechanize to submit bunch of data from our server to an online reservation
> system. The url is https://secure.mdausa.org/donate/
> It works in my browser however using mechanize following error appears:
>
> /Library/Ruby/Gems/1.8/gems/mechanize-2.0.1/lib/mechanize/http/agent.rb:241:in
> `fetch'':