All Questions
11 questions
0
votes
0
answers
383
views
Ruby POST multipart/form-data results in 302 Found
I am trying to upload a csv file to my endpoint. I tried doing this and resulting in 302 Found.
Tried other solution mentioned here: Multipart POST Ruby HTTPS but same results.
First option using net/...
0
votes
1
answer
52
views
How to get webpage body using ruby after passing form data
Basically to get the body of webpage i used to do this.
require "rest-client"
url="example.com"
test=RestClient.get(url)
But now the webpage has setup an authentication step. On entering the correct ...
0
votes
1
answer
115
views
Ruby Rest-Client for writing invoice API
I'm new to Ruby and trying to use the Ruby gem 'rest-client' to access the REST API of my accounting system, e-conomic.com. I am able to connect via tokens and e.g. fetch customer details - so far, so ...
2
votes
1
answer
4k
views
Pass parameters in RestClient post request
I want to send parameters with a POST request using the RestClient gem (but I don't want to pass the params as JSON).
In a GET request, I would have:
url = "http://example.com?param1=foo¶m2=...
5
votes
1
answer
10k
views
POST request to HTTPS using Net::HTTP
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}, ...
-1
votes
1
answer
588
views
How do I use RestClient to post as URL params?
I am posting to an API which accepts CURL as follows:
curl -v -X POST "https://url.com" -d 'input=frustrated&user_key=3b9ccb48e734fce6b982a9c1c2cef301'
I have tried the following with an error:
...
1
vote
3
answers
3k
views
Rest-client POST without a payload
I am trying to POST using Rest-Client gem in Ruby, and I keep getting a return from the web service as Error 414 Unsupported Media Type, because I am setting the payload argument as ''
Example
...
0
votes
0
answers
186
views
RestClient.put error in Ruby
I am trying to do a RestClient.put in Ruby for a highchart graphic but I see that this is not replicated. Also first I have a RestClient.post and works fine but the problem is then with the put. At ...
13
votes
4
answers
22k
views
Ruby rest-client file upload as multipart form data with basic authenticaion
I understand how to make an http request using basic authentication with Ruby's rest-client
response = RestClient::Request.new(:method => :get, :url => @base_url + path, :user => @sid, :...
1
vote
1
answer
3k
views
How to POST binary data using Rest Client?
I am trying to read in an audio file of type wav or amr from a HTML form using Rest Client. I have the code to do this in PHP.
$filename = $_FILES['f1']['name'];
public function getFile($filename) {
...
1
vote
1
answer
2k
views
getting internal server error using rest-client in ruby to post to HTTP POST
this is my code and I don't know how to debug it because I just get an "internal server error":
I am trying to HTTP POST to an external ASPX:
def upload
uri = 'https://api.postalmethods.com/...