<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question JSON message body for invoke http processor in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-message-body-for-invoke-http-processor/m-p/192367#M71061</link>
    <description>&lt;P&gt;How can I make the following http post request using InvokeHttp processor: &lt;/P&gt;&lt;P&gt;$ curl &lt;A href="http://xxxxxxxx:8993/solr/demo/update" target="_blank"&gt;http://xxxxxxxx:8993/solr/demo/update&lt;/A&gt; -d '
[
 {"url"         : "xxxxxxxx",
  "sharecount"   : {"set":10}
  }
] &lt;/P&gt;&lt;P&gt;I have used a attributesToJson processor which outputs a flowfile in the following format: &lt;/P&gt;&lt;P&gt;{
url:"xxxxxxxxxxxx", sharecount:10
}&lt;/P&gt;</description>
    <pubDate>Thu, 09 Nov 2017 18:37:24 GMT</pubDate>
    <dc:creator>ranithsr</dc:creator>
    <dc:date>2017-11-09T18:37:24Z</dc:date>
    <item>
      <title>JSON message body for invoke http processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-message-body-for-invoke-http-processor/m-p/192367#M71061</link>
      <description>&lt;P&gt;How can I make the following http post request using InvokeHttp processor: &lt;/P&gt;&lt;P&gt;$ curl &lt;A href="http://xxxxxxxx:8993/solr/demo/update" target="_blank"&gt;http://xxxxxxxx:8993/solr/demo/update&lt;/A&gt; -d '
[
 {"url"         : "xxxxxxxx",
  "sharecount"   : {"set":10}
  }
] &lt;/P&gt;&lt;P&gt;I have used a attributesToJson processor which outputs a flowfile in the following format: &lt;/P&gt;&lt;P&gt;{
url:"xxxxxxxxxxxx", sharecount:10
}&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 18:37:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-message-body-for-invoke-http-processor/m-p/192367#M71061</guid>
      <dc:creator>ranithsr</dc:creator>
      <dc:date>2017-11-09T18:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: JSON message body for invoke http processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-message-body-for-invoke-http-processor/m-p/192368#M71062</link>
      <description>&lt;P&gt;It looks like the Solr service wants an array of JSON objects but you have a single JSON object, and also it expects the sharecount value to be nested under sharecount in a "set" field. If you know the attributes you need and there aren't very many of them (for example, there are only two you mention), you can use ReplaceText instead of AttributesToJSON, using Expression Language to hand-create the JSON array. The replacement text might look like this:&lt;/P&gt;&lt;PRE&gt;[{"url": "${url}", "sharecount": {"set": ${sharecount}}}]&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Nov 2017 21:59:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-message-body-for-invoke-http-processor/m-p/192368#M71062</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2017-11-09T21:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: JSON message body for invoke http processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-message-body-for-invoke-http-processor/m-p/192369#M71063</link>
      <description>&lt;P&gt;Thanks a lot....it works perfect.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 01:15:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-message-body-for-invoke-http-processor/m-p/192369#M71063</guid>
      <dc:creator>ranithsr</dc:creator>
      <dc:date>2017-11-10T01:15:01Z</dc:date>
    </item>
  </channel>
</rss>

