Improve the Ajax service in order to get more flexible requests

This change allows us to call the request method directly from the
outside.