Skip to content

Conversation

@t27duck
Copy link
Contributor

@t27duck t27duck commented Jun 13, 2021

I could be completely off-base, but in the known limitations section in the README, I don't think this code actually would work...

  const request = new FetchRequest('post', 'localhost:3000/my_endpoint', { body: { name: 'Request.JS' }})
  const response = await request.perform()
  response.redirected // => will always be false.

I am pretty sure response in this case is a FetchResponse and not a Response, so redirected wouldn't be defined.

I exposed redirect from the internal respose object in FetchResponse to at least make the code in the README correct.

@marcelolx marcelolx merged commit 0eda429 into rails:main Jun 13, 2021
@t27duck t27duck deleted the expose_redirected branch July 2, 2021 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants