Things we did:

  • We spent some time looking into how Firefox and Chrome implement Headers . Interestingly, they don’t return combined-values when you “get” or “get-all”, just an array of values.
  • Response
    • Refactored the code to get rid of the internally stored net_traits::Response. It compiles and passes tests.
    • Only thing I’m unsure about is the how to handle internal_response, now that there is no longer a net_traits::Response in dom::Response.
  • Test Curation

Things we learned:

  • You can test out the Headers functions for any browser by using the given JS console via the Inspect button! e.g.
h = new Headers
> Headers {  }  
h.append("foo", "bar")
> undefined  
h.get("foo")
> "bar"
  • Not everyone follows the spec word-for-word.

TODO:

  • Body
    • Assuming dom::Response gets merged, start implementing body for Response and Request
  • Promise in Fetch
    • Make sure everything I can build as of now is done!