title: HTTP GET request to KDB+ Process using AngularJS
body: <p>I am working on a web app using AngularJS with which I am quite inexperienced.</p>
  
  <p>My aim is to have the user type some parameters into a text field, and then for a GET request to be sent out (using the $http service in Angular) using that parameter as one of the params in the GET request.</p>
  
  <p>The target of the request is a KDB+ process (A proprietary column oriented database/language from KX Systems). This process can take a request in the form of:</p>
  
  <pre><code>http://servername:1234/?queryToRunHere[paramFromApp]
  </code></pre>
  
  <p>This call should return a JSON string. Due to the fact that the webserver and this process run on different ports I get the "Access-Control-Allow-Origin" error that prevents me from running this query to a different port. I have attempted to use the $http.jsonp command (since I read this allows remote fetching) however this asks me to provide a "&amp;callback" parameter. This is not possible as KDB+ will interpret everything to the right of the "?" as an internal query.</p>
  
  <p>I am not really sure how to proceed, but these are my ideas so far:</p>
  
  <ol>
  <li><p>KDB+ provides an API for Java (but not as far as I am aware for JavaScript). Perhaps I could write some sort of web service in Java, which could then be called by angular, and which in turn would call KDB+ using its native API. The issue with this is that it creates another program to maintain, and also I am not sure how to go about writing such a service (what technology, framework, etc).</p></li>
  <li><p>There is another way inside Angular that I don't know about, or there is a way to not have to specify the callback parameter in $http.jsonp.</p></li>
  </ol>
  
  <p>I would be grateful any help.</p>