title: NiFi - How to send GET request with JSON via InvokeHTTP processor?
body: <p>I need to send the following GET request with JSON to <a href="https://www.example.com/api/" rel="nofollow noreferrer">https://www.example.com/api/</a></p>
  
  <pre><code>GET /path/to/data
  {
   "abcd": [
     "a1",
     "a2"
     ]
  }
  </code></pre>
  
  <p>Which is encoded in URL in such a way:
  <a href="https://www.example.com/api/path/to/data?json=%8B%0B%+" rel="nofollow noreferrer">https://www.example.com/api/path/to/data?json=%8B%0B%+</a>.....</p>
  
  <p>I tried to accomplish this request via these two NiFi flows:</p>
  
  <ol>
  <li><p>GenerateFlowFile -> ReplaceText -> UpdateAttribute -> InvokeHTTP -> PutFile</p></li>
  <li><p>GenerateFlowFile -> UpdateAtribute -> AttributeToJSON -> InvokeHTTP -> PutFile</p></li>
  </ol>
  
  <p>However, I fail to send the JSON with the request. Could you please give me a hint on how to configure these processors or suggest a different NiFi flow? (I also need to use Basic Authentication, that's the reason why I use InvokeHTTP processor)</p>
  
  <p>Thank you in advance for any replies.</p>