title: R shiny - How send a request url with params to R shiny and get just the data response?
body: <p>I have a shiny app (using shiny dashboard).
  I am trying to pass in parameters on the url, use these to produce some data and then return it to the calling application. I put this in my server:</p>
  
  <pre><code>  observe({
      #all url params come in via the 'url_search' variable.
      query &lt;- parseQueryString(session$clientData$url_search)
      action &lt;- query[['action']]
      if (!is.null(action)) {
        #handle all supported request here
        if(action == 'blah') {
          #... do somework here to create my dataframe
          shiny:::httpResponse(status=200, content_type="text/html; charset=UTF-8", mydataframe)
        } else {
          #... ignore unrecognized request
        }     
      }
    })
  </code></pre>
  
  <p>This works, but not in the intended way:</p>
  
  <p>The request is processed correctly, but the first thing that happens is the entire shiny app is rendered.
  Then, later on, I see a 'POST' request, with my original url as a referrer, and this posts the needed data as JSON data, but I don't know where it goes.</p>
  
  <p>What do I need so that I can send my url (with params) to my shiny app, and then have it bypass its usual interactive mode and just return raw json data immediately without rendering html? Is it because I am making the request via a browser? Should I make the same url request programmatically in R?</p>
  
  <p><strong>update</strong>: I tried using fromJSON('...') on my url doesn't work, either. I get:</p>
  
  <pre><code>Error in fromJSON(content, handler, default.size, depth, allowComments,  : 
    invalid JSON input
  </code></pre>