From: K. G. <kim...@gm...> - 2008-08-28 06:47:33
|
Hello, On Thu, Aug 28, 2008 at 03:47, Dean Michael Berris <mik...@gm...> wrote: > > For #2: > - It puts the method crafting a 'run-time' action, which introduces > if's and control-flow branches that I would like to be able to > eliminate at compile time otherwise > - Type safety (?) is broken because now the users will be able to > perform 'unsupported' or 'ill-formed' HTTP requests I can't think of one off-hand, but I think there may be cases where it makes sense to let the calling code vary the verb dynamically. Essentially, something like: client.request("POST", headers, body); So, #2 may not be all bad--after all it's all strings in the end :) I like the strongly named methods as they are now, but a generic request may be useful as well, otherwise you might _introduce_ control-flow branches for calling the right method in cases where the verb is not fixed. That said, I can't think of a good case at the moment... As such, maybe better to leave it until need arises, but I don't think it can be entirely discounted. Well, 2c worth, - Kim |