net-http Questions

4

Solved

I am kind of new to ruby and from a python background I want to make a head request to a URL and check some information like if the file exists on the server and timestamp, etag etc.,I am not able ...
Carlettacarley asked 1/5, 2013 at 20:27

2

Solved

How can I add Authorization Bearer to a POST request with Net::HTTP? I can only find help for "basic authentication" in the documentation. req.basic_auth 'user', 'pass' Source: https://docs.rub...
Radical asked 8/12, 2016 at 6:11

5

Solved

i have the following Ruby Code, for a tracking website in sandbox mode: require "net/http" require "net/https" require "uri" xml = <<XML <?xml version="1.0" encoding="ISO-8859-1" standal...
Arterial asked 15/2, 2014 at 15:50

5

Solved

I'm trying to set a proxy and to use it in a simple get request like in the documentation. But I always receive an error! The adress and port are right with open-uri it worked.. it's http://proxy:8...
Multiped asked 3/4, 2013 at 16:32

2

I'm getting repetitive warnings upon running a ruby script in a crontab, as well as manually in the terminal. /Users/rich/.rbenv/versions/2.7.4/lib/ruby/2.7.0/net/protocol.rb:66: warning: already i...
Charlottetown asked 22/12, 2021 at 3:10

5

I've a task to test different user agents on a URL through automation. I'm using ruby to code, and I've been trying to set an user agent using the following method, but it doesn't seem to recognize...
Dwinnell asked 27/4, 2011 at 0:32

3

Solved

I'm using rest-client to POST to a very slow web service. I'm setting timeout to 600 seconds, and I've confirmed that it's being passed down to Net::HTTP's @read_timeout and @open_timeout. However...
Telefilm asked 15/11, 2016 at 0:54

3

Solved

I want to get the content length of a page using GO net/http? I can do this in terminal using curl -i -X HEAD https://golang.org and then check the content-length field.
Brainchild asked 25/7, 2016 at 8:49

3

In Ruby, how can I get hold of the HTTP Request Headers that will be sent by a net/http(s) or open-uri request BEFORE it actually makes the request. In some cases, headers are used when creating ...
Bock asked 27/7, 2013 at 16:48

3

Solved

The code below yields the following error: OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server hello A require 'net/https' uri = URI.parse("https://<server&gt...
Ulund asked 12/9, 2014 at 18:4

5

Solved

I've found good examples of NET::HTTP for downloading an image file, and I've found good examples of creating a temp file. But I don't see how I can use these libraries together. I.e., how would th...
Deckard asked 27/8, 2013 at 20:7

3

Solved

I am trying to control keep-alives session to reuse the tcp connection by creating a Trasport. Here is my snippet and I am not sure how to add headers info for authentication. url := "http://loca...
Delisadelisle asked 19/12, 2016 at 19:30

6

Solved

I've got a URL and I'm using HTTP GET to pass a query along to a page. What happens with the most recent flavor (in net/http) is that the script doesn't go beyond the 302 response. I've tried sever...
Tharpe asked 3/8, 2011 at 22:42

1

Solved

I noticed that when a http request times out, Ruby (2.6.1) makes a second request. This causes problems with one of our endpoints, because a second worker is triggered which takes up resources. Yo...
Surprising asked 3/7, 2019 at 6:38

2

Solved

Ruby-on-Rails, Net::HTTPResponse NoMethodError:undefined method `closed?' for nil:NilClass Hello, I have faced an issue: I use the RSpec framework and I need to mock a response within a method whi...
Pyles asked 3/3, 2019 at 17:49

0

What can cause while making an HTTP connection to return EBADF (Bad file descriptor). Here is my following code wherein the HTTP connection is made. Although the error is very less now(happening v...
Saida asked 14/3, 2018 at 13:56

3

Solved

We recently renewed the SSL certificate of our site, and the following occurs on Mac OS El Capitan 10.11.3: require 'net/http' Net::HTTP.get URI('https://www.google.com') # => "<HTML>......
Pedigree asked 1/5, 2016 at 12:29

2

Solved

For some reason, on my development machine I'm getting very, very slow responses for HTTPS requests performed via Net::HTTP. I've tried RestClient and HTTParty and they both have the same issue. It...
Vestavestal asked 29/4, 2015 at 13:27

3

Solved

When I'm working with net/http in development it is extremely slow. I've installed net-http-spy gem to get some info about each request and I've found out that "opening connection" part takes the m...
Charqui asked 30/3, 2012 at 8:48

1

I’m using Ruby on Rails 4.2.7 on Mac El Capitan and just installed the Tor browser (v 6.0.4). I fired up my Tor browser, have verified its running by viewing a couple of web pages, but using this g...
Carolincarolina asked 11/9, 2016 at 16:52

1

Solved

I want to create a tls client using the net/http in GO how can I create it given the ca certificates?
Thordis asked 26/7, 2016 at 6:54

3

Solved

I'm trying to make a https post request in ruby and it works in curl, but I get a 400 bad request in ruby and I'm having trouble figuring out why. Heres the ruby code: require 'rubygems' require ...
Illuminating asked 29/1, 2013 at 19:41

2

Solved

I see that Go itself has a package net/http, which is adequate at providing everything you need to get your own REST APIs up and running. However, there are a variety of frameworks; the most popula...
Mcquade asked 8/7, 2016 at 10:25

2

Solved

I'm a new Go programmer, coming from the world of web application and service development. Apologies is this is a herp de-derp question, but my googling around for an answer hasn't found anything. ...
Anybody asked 30/5, 2016 at 15:44

1

Solved

This POST request using Ajax works perfectly: var token = "my_token"; function sendTextMessage(sender, text) { $.post('https://graph.facebook.com/v2.6/me/messages?', { recipient: {id: sender}, ...
Barytes asked 13/4, 2016 at 14:43

© 2022 - 2024 — McMap. All rights reserved.