Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

jsonp and resetCallback when already exists #2

Closed
ldadams opened this Issue · 1 comment

1 participant

@ldadams

When using the __next paging link in a result set the $callback and &callback are persisted by the server (odata4j). The current code adds these parameters again causing the callback to fail.

@ldadams

The following change seems to correct the issue.

    // if protocol is jsonp, $format=json needs to 
    // be added to the query string options.
    if (that.settings.dataType !== undefined && that.settings.dataType === 'jsonp') {
        if(that.uri.segments.root.indexOf("format=json") == -1){
            that.uri.segments.options.format = 'json';
        }
        if(that.uri.segments.root.indexOf("&callback=resultCallback") == -1) {
            that.uri.segments.options.callback = 'resultCallback';
        }
    }
@ldadams ldadams closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.