Here's the next one.
This change reduces IHttpClient.Get(GetRequest request) and IHttpClient.Post(PostRequest request) to one method, IHttpClient.Send(Request request) where Request.Method identifies it as Get, Post or other.
This means that IHttpClient supports multiple http verbs and no further changes to this interface are needed if the implementation needs to change to better support verbs beyond get and post.
I am aware that this is a breaking change to clients that implement their own IHttpClient but this is necessary for further work on http verbs. I also think that updating a wrapper IHttpClient implementation will not take long at all.
GetRequestHander and PostRequestHandler now look very similar and are what limit us to Get and Post only. They are next.
Here's the next one. This change reduces
IHttpClient.Get(GetRequest request)
andIHttpClient.Post(PostRequest request)
to one method,IHttpClient.Send(Request request)
whereRequest.Method
identifies it asGet
,Post
or other.This means that
IHttpClient
supports multiple http verbs and no further changes to this interface are needed if the implementation needs to change to better support verbs beyond get and post.I am aware that this is a breaking change to clients that implement their own
IHttpClient
but this is necessary for further work on http verbs. I also think that updating a wrapperIHttpClient
implementation will not take long at all.GetRequestHander
andPostRequestHandler
now look very similar and are what limit us to Get and Post only. They are next.