-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using remote service instead of local root #53
Comments
I found out where to hack it, but you probably want a more elegant fix that is configurable. In the file ...
HAL.Http.Client.prototype.get = function(url) {
var self = this;
this.vent.trigger('location-change', { url: url });
var jqxhr = $.ajax({
url: 'http://localhost:8080'+url, // <== FIX
dataType: 'json',
success: function(resource, textStatus, jqXHR) {
...
});
};
HAL.Http.Client.prototype.request = function(opts) {
var self = this;
opts.dataType = 'json';
opts.url ='http://localhost:8080'+opts.url; // <== FIX
...
};
... |
Isn't the "correct" answer here to follow Section 5 "Reference Resolution" of RFC 3986 "Uniform Resource Identifier (URI): Generic Syntax"? The main issue, if I understand it, is establishing a base URI. But if I visit:
It seems clear that the base URI is |
OK, so I had this same issue and I wasn't really able to test my API because it lacks support for handling relative URIs in the HAL API. The changes required are not actually in I've submitted a pull request to adds support for relative URIs for anyone who is interested. |
Rather than use the hal browser from the root directory I would prefer to point it to a remote service, e.g.
localhost:8080
how can I do this?The text was updated successfully, but these errors were encountered: