- From: Anne van Kesteren <notifications@github.com>
- Date: Fri, 13 Jan 2017 05:12:32 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 13 January 2017 13:13:06 UTC
Welkom! Part of the behavior of the API is defined through IDL. So https://fetch.spec.whatwg.org/#requestinfo is indeed either a `Request` or a string. However, what that means is that the binding layer (the bit IDL defines) will first check if the passed argument is a `Request` object and otherwise invoke `ToString()` on it (plus a couple of other things). And `URL` objects in turn, have a `toString()` defined (basically returning the value that the `href` getter returns). Combined, that gives the behavior you are observing. Going to tentatively close this, but I'll happily respond to any further queries. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/452#issuecomment-272439900
Received on Friday, 13 January 2017 13:13:06 UTC