Re: [whatwg/fetch] Clarify whether fetch method and Request accept URL instances (#452)

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