Comments

Since we allow imports to dart:io from code running with DDC/Dart2JS as long as none of the runtime behavior is used (as a hack to get around some other limitations) some code is using constants from dart:io like the ones in HttpStatus. There seem to be legitimate reasons to use these constants on the web - can we export them from both SDK libraries?

This comment has been minimized.

yeah I totally get where you're coming from (and agree). What's different about this one: we aren't really adding anything, just re-exporting something. Also integer constants like the ones on HttpStatus are "free" in dart2js (& should be in DDC too).

This comment has been minimized.

Can we make a decision on this one so I can correctly communicate to our internal users? I am nearing the completion of the 'strict platforms' work which is directly impacted by this. Users are not able to import form dart:io and dart:html in the same library. Users should know if they need to create their own static utility class or wait until html supports these constants.

This comment has been minimized.

But since dart2js will need to do some more work to load dart:io even when it is not used, and you will have to change the dart:html templates and regenerate the library, it is not much more effort to create dart:_http_constants now rather than later.

This comment has been minimized.

I was hoping for HttpHeaders because the constants are useful, however that class also has behavior that would likely be confusing to having in dart:http since all headers there are handled with Map<String, String> instead.