Generate a handler function with input.
Post and get data.