How the Sinatra web framework would look like in Delphi

The Ruby web framework Sinatra needs three lines of code to map a context (web address) with a HTTP GET request handler:

get '/hi' do
  "Hello World!"

In Delphi, I managed to implement the same with this code (see the web framework status project status here):

     function(Request: TRequest; Response: TResponse): TObject
       Result := TStringBuilder.Create('Hello world!');

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s