{"id":24750531,"url":"https://github.com/amdevit/restling","last_synced_at":"2025-03-23T03:19:41.468Z","repository":{"id":274560843,"uuid":"923186448","full_name":"AMDevIT/Restling","owner":"AMDevIT","description":"A lightweight, powerful, and easy-to-use REST client library for .NET","archived":false,"fork":false,"pushed_at":"2025-03-20T16:42:02.000Z","size":1399,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T17:04:53.194Z","etag":null,"topics":["dotnet","http","http-client","rest","rest-client","rest-framework","rest-library"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AMDevIT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-27T19:33:38.000Z","updated_at":"2025-03-10T20:50:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"dcd73712-a184-456d-a3e1-f5fe9c112a65","html_url":"https://github.com/AMDevIT/Restling","commit_stats":null,"previous_names":["amdevit/restling"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMDevIT%2FRestling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMDevIT%2FRestling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMDevIT%2FRestling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AMDevIT%2FRestling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AMDevIT","download_url":"https://codeload.github.com/AMDevIT/Restling/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245049034,"owners_count":20552612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","http","http-client","rest","rest-client","rest-framework","rest-library"],"created_at":"2025-01-28T09:08:15.807Z","updated_at":"2025-03-23T03:19:41.462Z","avatar_url":"https://github.com/AMDevIT.png","language":"C#","readme":"# Restling \n\n![Restling Icon](Assets/Icons/RestlingIcon.png)\n\nA lightweight, powerful, and easy-to-use REST client library for .NET.\n\n## Overview\nThe goal of Restling is to provide a flexible yet easy-to-use REST client API. While it's true that there are plenty of REST client libraries out there, Restling wants to stand out by focusing on stability and offering support for uncommon features, such as cookie injection. It is also designed to integrate seamlessly into dependency injection-based projects as a transient service.\n\n## Features  \n- Lightweight and easy-to-use API.  \n- Built-in support for cookie injection.  \n- Designed for dependency injection (transient service).  \n- Full support for .NET's `SocketsHttpHandler`.  \n- Highly customizable via `HttpClientContextBuilder`.  \n\n## Why the name \"Restling\"?\n\nWhile chatting with a friend, the name came to mind as a pun combining \"REST\" and \"Changeling,\" the Fae beings from Northern folk tales. Restling is a library that has taken on the form of a REST client—though its journey started as something entirely different.\n\n## Supported versions of DotNet\n\nRestling supports both the latest .NET version and the latest LTS version, ensuring compatibility and stability for a wide range of projects.\n\n*LTS Version:* .NET 8.0\n*STS Version:* .NET 9.0\n\n## Installation\n\nYou can use Visual Studio solution package management or use the following commands:\n\n### DotNet CLI\n\nFrom a valid terminal:\n\n```\ndotnet add package AMDevIT.Restling.Core\n```\n\n### NuGet Package Manager\n\nUsing Visual Studio powershell package manager:\n\n```\nInstall-Package AMDevIT.Restling.Core\n```\n\n## Basic usage:\n\nThe quickest way to use Restling is to allocate the client without parameters:\n\n### Example 1: Basic Usage\n\n```csharp\n\nstring uri;\nRestlingClient restlingClient = new();\nRestRequestResult restResponse;\n\n// Call the uri resource without deserialization of the content\nrestResponse = await restlingClient.GetAsync(uri, cancellationToken)\n\n```\n\nRestling has a lot of customization options. You can use the HttpClientContextBuilder object to customize behavior of the client and http message handlers.\nIn the following example, we will instantiate a HttpClientContext using the HttpClientContextBuilder instance, with the following characteristics:\n\n* SocketsHttpHandler: the new .NET message handler.\n* CookieContainer: a cookie container initialized using a cookie storage from the application database.\n* ILogger\u003cRestClientController\u003e: a logger for the current executing object.\n* A custom user agent.\n* A default header app-version with a valid version string set.\n\nThis code will allow the Restling client to send and receive cookies when a method is executed, adding the app-version header and setting a new user-agent.\n\n### Example 2: Advanced customization\n\n```csharp\n\nHttpClientContextBuilder contextBuilder = new();\nSocketsHttpHandler httpHandler = new();\nCookieContainer cookieContainer = this.RetrieveCookieContainerFromDatabase();\nRestlingClient restlingClient;\nILogger\u003cRestClientController\u003e logger = services.GetRequiredService\u003cILogger\u003cRestClientController\u003e\u003e();\nRestRequestResult\u003cResourceModel\u003e restResponse;\n\nhttpHandler.CookieContainer = cookieContainer;\n\ncontextBuilder.AddHandler(httpHandler, diposeHandler: true);\ncontextBuilder.AddDefaultHeader(\"app-version\", \"1.0.0\");\ncontextBuilder.AddUserAgent(\"AppThatUsesREST/1.0 (Windows NT 10.0; Win64; x64)\");\n\nrestlingClient = new(contextBuilder, logger);\n\nrestResponse = await restlingClient.GetAsync\u003cResourceModel\u003e(uri, cancellationToken);\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famdevit%2Frestling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famdevit%2Frestling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famdevit%2Frestling/lists"}