A HTTP handler is a process that is executed when a request is made for a particular resource. For example, ASP.NET provides a page handler to process *.aspx
files. Another example of an inbuilt handler is the web service handler used to process *.asmx
files.
In this recipe, let's write a generic HTTP handler that will return custom data to the calling script. The constructs used in this example are summarized in the following table:
Construct |
Type |
Description |
---|---|---|
|
jQuery selector | |
|
jQuery function |
This posts an Ajax request to the server with the set options |
|
jQuery function |
This transforms an array or object into another array |
|
jQuery UI method |
This attaches the autocomplete widget to the required element |