aurelia / http-client

A simple, restful, message-based wrapper around XMLHttpRequest.
MIT License
62 stars 59 forks source link

Ignore baseUrl with absolute URIs #102

Closed heruan closed 9 years ago

heruan commented 9 years ago

When using a configured instance of http-client with a baseUrl, using the shortcut methods (e.g. get(url)) won't work with absolute URIs, where in many cases one should deal with absolute URIs from the same API (e.g. HTTP Link header fields). The PR adds this support ignoring the baseUrl with absolute URIs, using a RegExp to have the match case-insensitive.

EisenbergEffect commented 9 years ago

This sounds pretty reasonable. @bryanrsmith Please review when available. Thanks guys!

bryanrsmith commented 9 years ago

Thanks, @heruan! Great suggestion. Couple things...

heruan commented 9 years ago

Done! Thank you @EisenbergEffect and @bryanrsmith :+1: