When I run the following code on the command line:
curl -X POST -H Content-Type:application/json -H Accept:application/json http://api.intellexer.com/analyzeSentiments?apikey=a91714aa-4db7-4264-8ab9-f209f592a0b3 -d '[{"id":"1","text":"neurotic"},{"id":"2","text":"tiny"},{"id":"3","text":"sensibility"}]'
I get the response:
{"sentimentsCount":3,"ontology":null,"sentences":[{"sid":"1","text":"<neg w=\"-1.65\">neurotic<\/neg>","w":-2},{"sid":"2","text":"<neg w=\"-1.65\">tiny<\/neg>","w":-2},{"sid":"3","text":"sensibility","w":0}],"opinions":null,"sentiments":[{"author":null,"dt":null,"id":"1","title":null,"w":-2},{"author":null,"dt":null,"id":"2","title":null,"w":-2},{"author":null,"dt":null,"id":"3","title":null,"w":0}]}
However, when I run it through an Execute Process, the document it returns is size 0.
I know that the header parameters need to be unquoted in this case, but I'm wondering what else I need to do to retrieve a response.
Here's my process:
<?xml version="1.0" encoding="UTF-8"?><process version="7.4.000">
<operator activated="true" class="productivity:execute_program" compatibility="7.4.000" expanded="true" height="103" name="cURL for sentiment (2)" width="90" x="45" y="34">
<parameter key="command" value="curl -X POST -H Content-Type:application/json -H Accept:application/json http://api.intellexer.com/analyzeSentiments?apikey=a91714aa-4db7-4264-8ab9-f209f592a0b3 -d '[{"id":"1","text":"neurotic"},{"id":"2","text":"tiny"},{"id":"3","text":"sensibility"}]'"/>
<parameter key="log_stdout" value="true"/>
<parameter key="log_stderr" value="true"/>
<list key="env_variables"/>
</operator>
</process>
<?xml version="1.0" encoding="UTF-8"?><process version="7.4.000">
<operator activated="true" class="text:read_document" compatibility="7.2.001" expanded="true" height="68" name="to document (18)" width="90" x="179" y="34">
<parameter key="extract_text_only" value="true"/>
<parameter key="use_file_extension_as_type" value="true"/>
<parameter key="content_type" value="txt"/>
<parameter key="encoding" value="SYSTEM"/>
<description align="center" color="transparent" colored="false" width="126">surveys to document</description>
</operator>
</process>
<?xml version="1.0" encoding="UTF-8"?><process version="7.4.000">
<operator activated="true" class="text:json_to_data" compatibility="7.2.001" expanded="true" height="82" name="JSON To Data (19)" width="90" x="313" y="34">
<parameter key="ignore_arrays" value="false"/>
<parameter key="limit_attributes" value="false"/>
<parameter key="skip_invalid_documents" value="false"/>
</operator>
</process>
P.S. The token is a free trial one, so no worries as far as giving that away.