Hi guys,

While writing some tests for the AeroGear JS API, I came across the following issue:

The Pipe.remove method of the AeroGear Android API does not require any data as a response. The callback has Void data. This means that the corresponding operation on the server/backend side returns an empty response.

However the AeroGear JS API relies on jQuery AJAX mechanism. When using the Pipe.remove method, jQuery tries to parse the empty response as JSON and it fails. I had to hack jQuery and add the following piece of code in order to use the same backend service for both AeroGear APIs:

parseJSON: function( data ) {
       
        if (!data) {
            return null;
        }

If you know any way to make the AeroGear JS Pipe.remove method to work when the server side returns an empty response and without hacking the JQuery, please share it.

Thanks,
Tolis