redstone-dart / redstone

A metadata driven microframework for Dart.
http://redstone-dart.github.io/redstone
MIT License
342 stars 42 forks source link

Use enums for HTTP methods. #80

Closed austincummings closed 9 years ago

austincummings commented 9 years ago

All HTTP methods under package:redstone/server.dart are just const strings. These should be enum's for when that functionality lands. It would also be cool if all HTTP methods could be put into this new enum.

luizmineo commented 9 years ago

Redstone v0.6 already uses enums for data types (json, form, text...). Although, since the http protocol doesn't restrict the method types that a request can use, I didn't find it safe to restrict Redstone to the common methods.

austincummings commented 9 years ago

Ah, makes sense. Then would it be possible to get the rest of the common HTTP methods declared as const String's then? For example the methods shown here.

luizmineo commented 9 years ago

Yes, that's a good idea. Thanks

luizmineo commented 9 years ago

Fixed in v0.6.0-alpha.3