Convert between http-clientRequests and CRequests per the spec draft. A few things:
The conversion can fail in the http-client -> CRequest direction for various reasons.
Certain restrictions are placed on the Request (e.g., must use one of the methods explicitly specified in RFC 2616). This isn't because I think it's unsafe to sign requests which don't meet these standards, it's just that I don't see any reason this would be useful and so I'm erring on the side of being restrictive for now. A bunch of these will probably open up once we've got the basic protocol in place and can better see the consequences of some of the decisions here.
On top of #4. (diff)
Convert between
http-client
Request
s andCRequest
s per the spec draft. A few things:http-client
->CRequest
direction for various reasons.Request
(e.g., must use one of the methods explicitly specified in RFC 2616). This isn't because I think it's unsafe to sign requests which don't meet these standards, it's just that I don't see any reason this would be useful and so I'm erring on the side of being restrictive for now. A bunch of these will probably open up once we've got the basic protocol in place and can better see the consequences of some of the decisions here.