- From: Jimmy Wärting <notifications@github.com>
- Date: Fri, 15 May 2020 15:16:25 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 15 May 2020 22:16:37 UTC
thinking this would be useful also, but in my current case it was not about rewriting but instead construct and mock a response object... ```js var res = new Response('', { url: 'https://example.com' }) console.log(res.url) // "" res.url = 'https://example.com' console.log(res.url) // "" ``` Why don't this work? I basically have to redefine or use a Proxy: ```js Object.defineProperty(res, 'url', { value: 'https://example.com' }) console.log(res.url) // "https://example.com" ``` -- 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/671#issuecomment-629525996
Received on Friday, 15 May 2020 22:16:37 UTC