Fixed a bug where just GET method was called. Changed callback signature.