Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
POSTing troubles [SOLVED]
awchisholm
RapidMiner Certified Expert, Member Posts: 458 Unicorn
Hello all
I'm having trouble getting http POSTing to work with RapidAnalytics
I confidently used the curl -T example in the video tutorial with no trouble. I then found that an html form with POSTing failed no matter what I did.
I read the documentation to determine that curl sneakily turns what looks like a POST into a PUT. If I use the -X option with curl, I can't get it to work.
I broke out the big guns to observe protocol traffic
This is the working curl -T command - note the sneaky PUT
hopefully...
Andrew
I'm having trouble getting http POSTing to work with RapidAnalytics
I confidently used the curl -T example in the video tutorial with no trouble. I then found that an html form with POSTing failed no matter what I did.
I read the documentation to determine that curl sneakily turns what looks like a POST into a PUT. If I use the -X option with curl, I can't get it to work.
I broke out the big guns to observe protocol traffic
This is the working curl -T command - note the sneaky PUT
PUT /RA/public_process/post? HTTP/1.1Whereas this is the non-working curl -X (the html form example is similar)
User-Agent: curl/7.20.1 (i686-pc-cygwin) libcurl/7.20.1 OpenSSL/0.9.8r zlib/1.2.5 libidn/1.18 libssh2/1.2.5
Host: 192.168.0.15:8080
Accept: */*
Content-Length: 72974
Expect: 100-continue
POST /RA/public_process/post? HTTP/1.1Before I spend hours Googling, is there something I could do to make this work with POST?
User-Agent: curl/7.20.1 (i686-pc-cygwin) libcurl/7.20.1 OpenSSL/0.9.8r zlib/1.2.5 libidn/1.18 libssh2/1.2.5
Host: 192.168.0.15:8080
Accept: */*
Content-Length: 26983
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue
hopefully...
Andrew
Tagged:
0
Answers
In the PUT case, the file that turns up in RA is a valid zip file. In the POST case, the file has various headers before the data, things like "content-disposition". RM on the RA machine is expecting a zip file but it isn't quite this.
Andrew
POSTing an html form causes extra name-value pairs to be inserted in the http request that cause confusion on the RA server. POSTing or PUTting using a more direct approach gets round it. Now I can create simple static Web pages that are able to take zip files from a user, upload to the RA server for processing with RM.
Andrew