Capture HTTP verb for jQuery ajax errors. Fixes #13

Includes test.

@coryvirok