Giter VIP home page Giter VIP logo

Comments (10)

rugk avatar rugk commented on May 16, 2024 1

well… looked at it again and you seem to be correct, there is no problem like this anymore.

from content.

duduindo avatar duduindo commented on May 16, 2024

@rugk I've created an issue in MDN browser-compat-data. Thank you!

mdn/browser-compat-data#3355

from content.

rugk avatar rugk commented on May 16, 2024

okay, so closing this one here…

from content.

queengooborg avatar queengooborg commented on May 16, 2024

Coming from the issue on BCD. I think that there may have been a misinterpretation of the note; the compatibility table doesn't mention anything about .get() with no arguments. It mentions .getAll()'s functionality of obtaining all the headers of a given name being placed into .get(), meaning a name still needs to be specified.

from content.

rugk avatar rugk commented on May 16, 2024

But this is obsolete:

Headers.getAll()
Used to return an array of all the values of a header within a Headers object with a given name; this method has now been deleted from the spec, and Headers.get() now returns all values instead of just one.

Maybe that is really bad formulated, especially as it mentions the .get() without any given parameter.

from content.

queengooborg avatar queengooborg commented on May 16, 2024

Ah, okay. That part isn't in the BCD, that's the documentation itself. Yeah, I would agree, the wording seems a little odd to me. Well, I just made a quick edit that should do the trick! How's it look?

from content.

chrisdavidmills avatar chrisdavidmills commented on May 16, 2024

@vinyldarkscratch I think your rewording looks good; closing this one.

from content.

rugk avatar rugk commented on May 16, 2024

Hmm, still see no difference/explanation here.

So to clarify .get("") would get all headers or what? (Edit: tried, did not work.)

Also even https://developer.mozilla.org/en-US/docs/Web/API/Headers/get is not really explicit there. Actually, I see it nowhere even mentioned that retrieving all headers is possible.

Also consider adding an example in here. There is only the yellow box that tells the same: behaviors merged. So how do I do "get al"?? 😕


Or is it not possibly anymore? If so, just tell it: "You cannot receive all headers without specifying them anymore." or so, but do not talk about some kind of "merging" when actually behaviour has been removed… 🙄


Ah or wait: Now I get it: .getAll could not actually return all headers? You had to specify them anyways… Ah, that makes it clear. Possibly this is also why it was renamed ("get all" implies you get well… all), so maybe this is the only misconception I had: If the old behaviour did not allow it, but was merged, it obviously does not work now either… (but if you misinterpret the old behaviour, this fails)

So again, however, explicitly state it. Just something like "You cannot retrieve all headers at a time.", possibly with a workaround: "But you can…"

from content.

chrisdavidmills avatar chrisdavidmills commented on May 16, 2024

Since there are still concerns here, I'll reopen this one, and I've tagged it and put it into the backlog. I've not got time right now, but I'll pick this one up in our next sprint.

from content.

himanshugarg avatar himanshugarg commented on May 16, 2024

Is this stiill an issue? get() returns only the requested header as documented and there is no getAll()?

from content.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.