Tuesday, April 7, 2015

POST to a url with basic authentication and 301 response without follow through.

require 'rest-client' $result = '' RestClient.post('https://username:password@localhost:3000/', {} ) do |response, request, result| $result = result["Location"] end puts $result It took some digging but it's nice and short. Happy thoughts.

No comments:

Post a Comment