Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Ajax api call with relative url #48

Open
cyang05 opened this issue Jan 23, 2015 · 1 comment
Open

Ajax api call with relative url #48

cyang05 opened this issue Jan 23, 2015 · 1 comment

Comments

@cyang05
Copy link

cyang05 commented Jan 23, 2015

Boomerang is overriding url logic of jquery ajax call.
We use relative url to load static json file from the server with jquery ajax.
Let's say we have a json file with path:
http://www.example.com/json/my.json
var r_url = 'json/my.json'
$.ajax({
url: r_url,
type: "GET",
async: false,
timeout: 10000, // 10 seconds
success: function() {
},
error: function() {
});

Suppose current page is http://www.example.com/some/page
The actual url of the api becomes
http://www.example.com/some/page/json/my.json

We don't have this problem without boomerang library.
After investigating, we found that boomerang is making the ajax api call not jquery.
I think boomerang is overriding the relative url logic of jquery and cause the problem.

Thanks.

@bluesmoon
Copy link
Contributor

This github project is obsolete. Please have a look at https://github.com/lognormal/boomerang/ for the latest boomerang code.

bluesmoon pushed a commit to bluesmoon/boomerang that referenced this issue Mar 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants