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.
Get Page - Request Method PUT
There are two request methods in the Get Page operator - GET and POST. Is there a way to implement also PUT method?
If I manually change either GET or POST method to PUT in XML, the process fails: <parameter key="request_method" value="PUT"/>
Thanks!
0
Best Answers
-
IngoRM Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM Founder
Hi,
Not with the Get Page operator which - as you saw - only support Get and Post.
But you could implement a put request with a command line tool for your OS which you invoke with the Execute Program operator.
Hope this helps,
Ingo
1 -
IngoRM Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM Founder
Even better - thanks for sharing!
Best,
Ingo
0
Answers
Ingo, thank you very much!
Another way is to deploy the Execute Script operator. The example below works fine.
-----------------------------------------------------------
String json = %{query_string};
String requestString = %{URL}
//send request
URL url = new URL(requestString);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
conn.setRequestMethod("PUT");
conn.setRequestProperty("Content-Type", "application/json");
OutputStream os = conn.getOutputStream();
os.write(query_string.getBytes());
os.flush();
int responseCode = conn.getResponseCode();
-----------------------------------------------------------
Pavel