Calling HTTP

HTTP was chosen as the underlying protocol because there are many libraries written for many different programming languages that can use it. It is beyond the scope of this manual to teach you how to program in all of these languages, but examples in common languages, such as Java, C#, Ruby and Python are provided as resources on the Elixir Technology web site. However, as a short example, here's how to call the query mime-types service (described in the reference below) using Ruby:

require 'net/http'

Net::HTTP.start('localhost',8080){
|http|
  req = Net::HTTP::Get.new('/query/mime-types')
  req.basic_auth 'admin', 'sa'
  response = http.request(req)
  print response.body
}

That wasn't so hard, was it? Every language will vary, but through use of the right abstractions and libraries (e.g. HttpClient for Java) you can write true Service-Oriented Applications (SOA) that utilise all of the services that Elixir Repertoire Server provides. As an example, Elixir Repertoire Remote is written using exactly the same network API that is exposed to you.