Closed nhooyr closed 6 years ago
Maybe we should write our own router 😂
chttp
isn't a bad place
Another possibility is to add methods for each request. E.g. instead of Request()
, we use Get()
and GetPath
.
Maybe we should only have GetPath
, one could just provide an empty path. Though, that seems janky so nvm.
Using Path methods are really an antipattern. Your RequestOptions should set the dynamic components of the path.
but I like the method enumeration instead of Request
Then why do we provide RequestURL?
My bad, it's usually an antipattern, but there are some cases where I think it's fine. E.g it would be overkill for the example/helloworld test to use options
I think we should go with consistency here. If the functional options can do it, we shouldn't provide another method, even though it may be overkill in certain cases.
https://github.com/codercom/hat/blob/51b4351671193d4c595303ca568ea9dd5e439592/method.go#L6
Feels like something that is more general than testing. Maybe into
chttp
? Doesgin
provide anything?