Skip to content

Upgrade RestSharp from 106.11.4 to 113.1.0 - #1

Draft
bostick23 with Copilot wants to merge 4 commits into
masterfrom
copilot/update-restsharp-to-latest-version
Draft

Upgrade RestSharp from 106.11.4 to 113.1.0#1
bostick23 with Copilot wants to merge 4 commits into
masterfrom
copilot/update-restsharp-to-latest-version

Conversation

Copilot AI commented Jan 22, 2026

Copy link
Copy Markdown

RestSharp 106.11.4 has known security vulnerabilities and uses deprecated patterns. Upgraded to 113.1.0, which requires .NET Framework 4.7.1+ and introduces breaking API changes.

Breaking Changes Addressed

Serialization/Deserialization

  • Implemented ISerializer and IDeserializer interfaces (replaced IXmlDeserializer)
  • Created PrestaSharpSerializer combining both interfaces for XML handling
  • Removed SerializeAsAttribute usage (no longer available)

API Surface Changes

  • IRestResponseRestResponse
  • IRestRequestRestRequest
  • ExecuteTaskAsync()ExecuteAsync()
  • AddParameter(..., ParameterType.RequestBody)AddStringBody()
  • AddParameter(..., ParameterType.QueryString)AddQueryParameter()
  • Method.POST/PUT/DELETEMethod.Post/Put/Delete

Client Configuration

// Before (106.x)
var client = new RestClient { BaseUrl = new Uri(BaseUrl) };
client.AddHandler("text/xml", () => new PrestaSharpDeserializer());

// After (113.x)
var options = new RestClientOptions(BaseUrl);
var serializer = new PrestaSharpSerializer();
var client = new RestClient(options, 
    configureSerialization: s => s.UseSerializer(() => serializer));

Extension Methods
Created custom extensions in Bukimedia.PrestaSharp.Helpers namespace:

  • StringExtensions: AsNamespaced(), ToCamelCase(), RemoveUnderscoresAndDashes()
  • ReflectionExtensions: GetAttribute<T>()

RestSharp 113 provides IsSubclassOfRawGeneric() and FindEnumValue() in its own RestSharp.Extensions namespace, so these were not duplicated.

Target Framework

Updated from net452 to net471 (minimum required by RestSharp 113).

Original prompt

Questo progetto è basato su una versione obsoleta di RestSharp. Aggiorna all'ultima versione la libreria e adatta il codice ai cambiamenti che sono avvenuti


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 22, 2026 12:13
Co-authored-by: bostick23 <11504353+bostick23@users.noreply.github.com>
Co-authored-by: bostick23 <11504353+bostick23@users.noreply.github.com>
Co-authored-by: bostick23 <11504353+bostick23@users.noreply.github.com>
Copilot AI changed the title [WIP] Update RestSharp library to latest version and adjust code Upgrade RestSharp from 106.11.4 to 113.1.0 Jan 22, 2026
Copilot AI requested a review from bostick23 January 22, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants