About Webapi 4

Already the fourth example in the webapi series!

I try to build upon the previous webapi examples. If the example.md misses something, make sure to check out the previous webapi examples

Now we will use .htaccess on the server to get 'pritty print url' And use the Web Dispatcher, read more Haxe api

This example will look the same as the previous example, with a little deference: the url!

http://localhost/home instead of http://localhost/?state=home


In any website, it is necessary to be able to transform a given URL (such as /user/view) and GET/POST parameters (such as userId=10&edit=1) into the corresponding function call that will process the request and its parameters.

A typical website application will do (for each request) :

  • Connect to the database, fetch user/session credentials, initialize everything
  • Resolve the class/method which we need to call based on the URL
  • Dispatch the request (call the method)
  • Print result
  • Cleanup

More info

This example is a simplified example from the example written down by Jason O'Neil

results matching ""

    No results matching ""