Displaying 20 results from an estimated 60000 matches similar to: "simple net/http request encoding"
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)
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",
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"
2010 Sep 09
17
formtastic issue
Hello,
I will try to explain it step by step :-)
I just created a new rails 3 app, then I created a new controller...
rails generate controller admin::users
I didn''t forget to add the resources in the routes.rb file like this.
namespace :admin do
resources :users
end
Now I try to use formtastic to create the form but I get erorr that my
users_path doesn''t exist?
2013 May 07
2
Net::HTTP
I''m looking at the documentation:
http://ruby-doc.org/stdlib-2.0/libdoc/net/http/rdoc/Net/HTTP.html
And I notice two uses of Net::HTTP. Both are using GET requests. But
what''s the difference? When to use which?
Net::HTTP.start(uri.host, uri.port) do |http|
request = Net::HTTP::Get.new uri
response = http.request request # Net::HTTPResponse object
end
uri =
2012 May 25
1
Connect reset by peer error
Hi all
I''m getting a ''Connection reset by peer'' while getting an access token during oAuth from a third party API. Here''s the code snippet:
def accesstoken
@code = params[:code]
url = URI.parse(''access token request url'')
req = Net::HTTP::Post.new(url.path)
req.set_form_data({''auth_code'' => @code,
2009 Nov 25
0
asterisk + res_config_ldap = asterisk.core
Greetings.
Attempting to connect Asterisk to LDAP database using res_config_ldap
module. While trying to register sip client (Ekiga softphone),
according to slapd.log, asterisk connects to LDAP server, asks for
some attributes to modify (they do exist, and asterisk user has all
permissions to do that,
etc). And then asterisk application just crashes.
Without ldap (using just static users'
2008 Apr 30
1
Google Ajax Search API - UTF-8 encoded response
Hello All,
I am writing a facebook application in ruby on rails, which requires
google search in one page.
I''ve implemented this using a simple RESTful interface as follows:
url = URI.parse( "http://ajax.googleapis.com/ajax/services/search/
local?v=1.0&q="+params[:keyword] )
req = Net::HTTP::Get.new(url.path+"?"+url.query)
res = Net::HTTP.start(url.host,
2006 Aug 13
0
Announcement: Really simple localization plugin
I needed something simpler than Globalize and GLoc to localize my Rails
application into Danish. I packed it into this plugin. Feel free to use it.
Languages available: Spanish, German, Swedish, Danish, and ("Swedish Chef"
for the fun of it)
Plugin available at http://visitjesper.homeip.net/plugins/
IMPORTANT: Plugin directory likely to move to more appropriate location
anytime
The
1997 Oct 18
0
R-alpha: This weeks bugs and requests for enhancements
Here's a number of items that came up in connection with my course for
medical ph.d. students this week:
boxplot():
- deals ungracefully with empty groups and factor levels not
present in grouping variable.
- no indication of what variable is being plotted
data.entry() (mostly W95 rseptbeta problems)
- Entry of first variable name doesn't take before 2nd
2011 Oct 11
0
Mechanize gem. What's the price?
Hi,
I''ve been trying to fix a problem when making a https request using
Net::HTTP
No matter how I tried I was getting and EOF error.
Then I tried with Mechanize gem and it worked like a charm.
The code I use now for Mechanize is:
agent = Mechanize.new
agent.keep_alive = true
page = agent.post("https://somewhereintime.bla", {''tagid'' =>
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 03
1
Sweavelistingutil: Encoding problems
Hello,
I am not sure whether this is a bug or lack of R experience.
However, I am using your Sweavelistingutil package, which is very
nice. Obviously I use it to create LaTeX files. These are encoded in
utf8.
However, when I use the Sweavelistingutil is uses some funky
character for "`" and "'" that is not recognized.
Here is an example from my tex-file:
,----
|
2008 Apr 11
2
issues on Net:HTTP
in cotroller:
@url=URI.parse(''http://google.com.sg/webhp'')
@res = Net::HTTP.get_response(@clarifyurl)
in view: <%=@res.body>
this page displayed as
301 Moved
The document has moved here
what''s wrong with my code, I want to get the correct reponse HTML
content from google.
--~--~---------~--~----~------------~-------~--~----~
You received this message
2012 Oct 24
2
concurrent requests (Rook, but I think the question is more general)
This question involves Rook, but I think the answer will be general
enough that it pays to post here. At any rate, I don't know enough to
know whether this is a Rook only issue or a general R issue.
Here's what I'd like to do (and indeed, have code that should do this):
1. Start R, Rook
2. Start an analysis via a HTTP request to Rook. This analysis uses
.Call() to some compiled C
2005 Dec 22
5
How to access request''s raw_header: HTTP hdr sent by browser
Is that something possible, i''ve been trying to get to the RAW headers
sent during a GET request on a page, and couldn''t find where. I''m using
webrick.
Here are the tries I did to get access to it:
class ZController < ApplicationController
def info
#render :inline => request.inspect
#render :inline => raw_header.inspect
#render :inline =>
2016 Aug 20
0
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
The virtio pstore driver provides interface to the pstore subsystem so
that the guest kernel's log/dump message can be saved on the host
machine. Users can access the log file directly on the host, or on the
guest at the next boot using pstore filesystem. It currently deals with
kernel log (printk) buffer only, but we can extend it to have other
information (like ftrace dump) later.
It
2016 Aug 31
0
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
The virtio pstore driver provides interface to the pstore subsystem so
that the guest kernel's log/dump message can be saved on the host
machine. Users can access the log file directly on the host, or on the
guest at the next boot using pstore filesystem. It currently deals with
kernel log (printk) buffer only, but we can extend it to have other
information (like ftrace dump) later.
It
2006 May 23
0
FakeWeb test helper for Net::HTTP / open-uri web requests
Hey All,
I''ve posted the first release of FakeWeb, a little library to help
with all your http client testing needs. This helper makes it trivial
to setup an idempodent environment for you to test any web service
requests in your applications.
Available on RubyForge, http://rubyforge.org/projects/fakeweb/
== Overview
* Force Net::HTTP (and any dependent libraries, e.g. open-uri) to
2016 Aug 31
1
[PATCH 1/3] virtio: Basic implementation of virtio pstore driver
On Wed, Aug 31, 2016 at 05:08:00PM +0900, Namhyung Kim wrote:
> The virtio pstore driver provides interface to the pstore subsystem so
> that the guest kernel's log/dump message can be saved on the host
> machine. Users can access the log file directly on the host, or on the
> guest at the next boot using pstore filesystem. It currently deals with
> kernel log (printk) buffer