HTTPI provides a common interface for Ruby HTTP libraries.
Questions tagged [httpi]
20 questions
37
votes
7 answers
View Savon Request XML without Sending to Server
I'm using the Savon gem to make a SOAP request using code similar to what's below. It's working, but I would like to view/capture the request XML without actually making a call to their server. I can view it now after a request is made by sticking a…

Peter Brown
- 50,956
- 18
- 113
- 146
8
votes
1 answer
Change HTTPI SSL default cert file location with environment variable
According to this page I can see where HTTPI is looking for my SSL certificate based on the OpenSSL::X509::DEFAULT_CERT_FILE constant:
2.1.5 :008 > OpenSSL::X509::DEFAULT_CERT_FILE
=> "/usr/lib/ssl/cert.pem"
My certificates are elsewhere but that…

iftheshoefritz
- 5,829
- 2
- 34
- 41
7
votes
1 answer
SSL mode flags - verification of certificates: is it safe to use :none?
I am writing a soap request over SSL using Savon and HTTPi, a Ruby soap client and an interface for Ruby HTTP clients, respectively. Here's the code:
client = Savon::Client.new(original_class.constantize.wsdl_url)
client.http.auth.ssl.cert_key_file…

DWS
- 215
- 2
- 10
6
votes
3 answers
Savon SSL Issue
I'm struggling to get the Savon gem to connect to one of our servers. I keep getting an error stating I can't get past the ssl. I've read numerous tutorials and fixes but none seem to work.
Any help appreciated - this will make my Monday if I…

Northband
- 433
- 1
- 6
- 11
6
votes
2 answers
"HTTPI tried to user the httpi adapter" error using Savon SOAP library
I am using Savon to write a Ruby interface to a SOAP service. It appears to be working, but I am getting a couple of DEBUG messages appearing on the command line
D, [2011-02-15T16:33:32.664620 #4140] DEBUG -- : HTTPI tried to use the httpclient…

Dave Isaacs
- 4,499
- 6
- 31
- 44
4
votes
3 answers
Can the Ruby HTTPI library be configured to follow redirects?
I am using the Savon library which in turn uses HTTPI, but HTTPI considers only HTTP status codes 200..299 as successful. Unfortunately, the SOAP server I am connecting to uses HTTP 302 Found to redirect its clients to other URLs. Is there a way I…

f.ardelian
- 6,716
- 8
- 36
- 53
3
votes
0 answers
Using SSL server authentication with Savon
I'm connecting to a biztalk SOAP API, and I've been given a public cert from the server to use to connect using ssl server authentication.
I'm using: Ruby 1.9.2, Curb (0.7.15), Savon (0.9.1) HTTPi (0.9.2)
I can't seem to get it to work properly, but…

Vanderkerkoff
- 31
- 1
- 2
2
votes
1 answer
How to test wash_out controller with Rspec in Rails 5
I am using wash_out to create a soap webservice, this is my controller:
class SignerController < ApplicationController
soap_service
soap_action 'xmlSign', args: {
xml: :string,
certificate: :string
},
return: {
…

Lluís
- 1,267
- 1
- 14
- 36
1
vote
2 answers
specify proxy authentication with savonrb
I'm using savon to communicate with a soap web service.
It all works well, and I now need to get the ruby code into production where we have to go through a proxy server.
This proxy server requires authentication.
So my question is, how can I go…

hendrikswan
- 2,263
- 1
- 20
- 25
1
vote
1 answer
"you are being redirected" status code 302 rails
I have an API which when returns me text/css which is in string format instead of JSON, so when I hit that API using Postman I get back the whole css data with status code 200 but when I hit the same API using HTTPI or any other library I am getting…

Abhishek Jain
- 826
- 8
- 20
1
vote
2 answers
Savon HTTPS Request with HTTP authentication
I have written an integration with a SOAP API using savon. I am running into issue which seems to be only with certain OSs. The reason I say that is because the same code works on CentOS6 and MacOSX but it refuses to work with Ubuntu12.04. The code…

David Hahn
- 740
- 9
- 26
1
vote
1 answer
Curl using ruby
I'm trying to use Curl with SPNEGO negotiate kind of authentication through ruby.
I tried several libraries, but seems like httpi has a way to do it through it's curb adapter like this link:
https://gist.github.com/3179054#comments
I was wondering…

anipendakur
- 85
- 10
0
votes
1 answer
httpi-ntlm gem for all three auth type
I was using httpi-ntlm ruby gem to get the RSS feeds from the given url, username and password.
I want to know if there is a way I can use all three auth types in my method so that the server picks the setting it prefers???
def get_data…

user703099
- 15
- 4
0
votes
1 answer
Savon raises error inside Rails app, but not inside irb
I'm using Savon library to get some SOAP requests work. And i'm using almost the same code within IRB and Rails application. When i'm running IRB everything works as it should, but Rails generate error "no method 'to_hash' for nil:NilClass" inside…

shybovycha
- 11,556
- 6
- 52
- 82
0
votes
0 answers
Httpi timeout on PUT but POST works
I am trying to get PUT working with httpi. I am using curb (curl) as my adapter with gss negotiation (I need to use a Kerberos token). I am able to GET the article_to_update and I'm able to POST new articles using almost the exact same code…

Greg Ruhl
- 1,060
- 2
- 9
- 27