Tiny.RestClient
Tiny.RestClient copied to clipboard
Add support of cookie
- Add cookies un requests
- Read cookies in ouput
- Cookie container for all request
Hey @jgiacomini , about this issue, Are you still up for it ?
An effective way to achieve this (in my opinion) is to create a Response<T>
class that implements the generic interface below to cater for all types of responses and their respective cookies except ExecuteAsHttpResponseMessageAsync
(since the cookies can be gotten from the HttpResponseMessage
drectly). The headers are added to cater for your Issue 1 as well. What do you think ?
interface IResponse<T> {
Headers headers { get; }
Cookies Cookies { get; }
T Content { get; }
}
Hello @yemikudaisi, If you can help to add this feature on the package it will be really appreciated.
I am working on the v2.0 which remove the dependency to Newtonsoft and use System.Text.Json. I am also working to remove all the unnecessary memory allocations to have the fastest rest API client