restsharp / restsharp/RestSharp
Cookies are not added to cookie container when running on iOS
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9.8k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
When using rest sharp in NET MAUI application development, for the same API call that is supposed to inject a cookie, in Android you will see the cookie but it is missing when running in iOS device.
Code Sample:
async Task TestCookiesAsync(){
var restClient = new RestSharp.RestClient(new RestSharp.RestClientOptions()
{
BaseUrl = new Uri("https://google.com"),
CookieContainer = new System.Net.CookieContainer()
});
var request = new RestSharp.RestRequest("", RestSharp.Method.Get);
var response = await restClient.ExecuteAsync(request);
Console.WriteLine(response.Cookies.Count);
}
Expected behaviour:
The response cookie should be added inside the cookie container.
- OS: iOS 17.2.1 (iPhone 11 )
- NET MAUI .NET 8
- Rest Sharp V 110.2.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided RestSharp cookie sample in the reported .NET MAUI iOS environment, then compare its behavior with Android. Trace the cookie handling path used by the request and verify completion when the response cookie is added to the configured CookieContainer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, ios
- Domain
- api, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100