Skip to content

Use FETCH#URL to describe the name of a request #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

noamr
Copy link
Contributor

@noamr noamr commented Feb 28, 2021

Instead of specifying here that it's the URL before redirects,
which is essentially the same thing.

Closes #244


Preview | Diff

Instead of specifying here that it's the URL before redirects,
which is essentially the same thing.

See #244
@noamr noamr requested a review from yoavweiss February 28, 2021 11:28
"HTML#resolve-a-url">resolved URL</a> of the requested resource.
This attribute MUST NOT change even if the <a data-cite=
"FETCH#concept-fetch">fetch</a> redirected to a different URL.</dd>
"FETCH#concept-request-url">URL</a> of the resource's <a data-cite=
Copy link
Contributor

@yoavweiss yoavweiss Mar 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at https://fetch.spec.whatwg.org/#concept-request-url I don't see it being explicitly set to the first URL in the list, and there's a note saying "implementations are encouraged" to do that. As such, I don't know if this is something we want to rely on. Maybe we should explicitly point to the first URL in the URLList?

/cc @annevk for his opinions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like URL is set to be exactly that, judging by the fact that during redirects it's not changed.
But I would let @annevk confirm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, looking closer it seems to be set in the Request constructor and not modified on redirects.

@annevk
Copy link
Member

annevk commented Mar 1, 2021

I'm not sure what "resource" is, but I suspect it's a response. Assuming I'm right, I think you want to get data from the response and not assume that the response has access to the request.

@yoavweiss
Copy link
Contributor

I'm not sure what "resource" is

There's a plan to clarify that as part of #252, but I don't know we have a full design for that just yet.

I suspect it's a response. Assuming I'm right, I think you want to get data from the response and not assume that the response has access to the request.

Would it make sense then to grab the first item from [https://fetch.spec.whatwg.org/#concept-response-url-list](Response's URL list)?

@annevk
Copy link
Member

annevk commented Mar 1, 2021

Yeah, probably, if you can be certain it's non-empty (i.e., you do not access it when fetch hasn't returned it yet).

@noamr
Copy link
Contributor Author

noamr commented Mar 1, 2021

I'm not sure what "resource" is

There's a plan to clarify that as part of #252, but I don't know we have a full design for that just yet.

It might be good to start from #252 then, it would clarify a lot of these issues, as the request/response etc will probably be a parameter passed from FETCH at a particular point in time.

@noamr noamr closed this Mar 29, 2021
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.

Definition of name needs to be more precise
3 participants