Ramone 5.0.0

dotnet add package Ramone --version 5.0.0                
NuGet\Install-Package Ramone -Version 5.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ramone" Version="5.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ramone --version 5.0.0                
#r "nuget: Ramone, 5.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Ramone as a Cake Addin
#addin nuget:?package=Ramone&version=5.0.0

// Install Ramone as a Cake Tool
#tool nuget:?package=Ramone&version=5.0.0                

Ramone - A C# library for working with REST services and Web APIs

Ramone is a C# library that simplifies access to HTTP based Web APIs and REST services. It has a strong focus on REST and hypermedia and implements elements of the Uniform Interface as first class citizens of the API.

Ramone has built-in support for serialization of simple objects as JSON, XML, URL-encoding and multipart encoding.

Ramone works with .NET Standard 2.0 and supports async/await construct

This means natural support for

  • URIs as identifiers for resources.
  • The standard HTTP methods GET, POST, PUT and more.
  • Multiple media types (XML, JSON, HTML, ATOM, multipart, urlencoded and more).
  • User defined media types.
  • Hyper media controls (linking and key/value forms).
  • Automatic redirect handling.
  • File up/download.
  • Asynchronous requests

What Ramone does is to wrap the inner workings of HTTP (using .NET's HttpWebRequest/HttpWebResponse classes) and make encoding and decoding easier through the use of codecs for the various formats used on the web.

In its most simple form you can GET a resource like this:

  // Define resource type
  class Cat
  {
    public string Name { get; set; }
    public DateTime DateOfBirth { get; set; }
  }

  // Create session pointing to service root
  ISession Session = RamoneConfiguration.NewSession(new Uri("http://cat-example.com"));

  // Setup HTTP request
  Request req = Session.Bind("/cat/{name}", new { name = "Mike" });

  // Make actual request
  using (var resp = req.AcceptXml().Get<Cat>())
  {
    Cat c = resp.Body;
    Console.WriteLine("Cat with name={0} was born on={1:d}.", c.Name, c.DateOfBirth);
  }

See more examples here: https://github.com/JornWildt/Ramone/wiki/Examples.

Happy hacking.

Jorn Wildt

DOWNLOAD

Binaries are available on NuGet:

NuGet: https://www.nuget.org/packages/Ramone

DOCUMENTATION

I am trying to write a complete downloadable manual which is available as a PDF. You can either download that together with the binaries via the links above or access the nightly build here: http://elfisk.dk/Ramone/Documentation/Ramone.pdf

There are some online examples on the GitHub wiki: https://github.com/JornWildt/Ramone/wiki/Examples

In addition to this there is a few blog posts:

Consuming Web APIs in C# with Ramone http://soabits.blogspot.com/2012/04/consuming-web-apis-in-c-with-ramone.html

Introducing the Ramone C# Library for Web API Clients http://soabits.blogspot.com/2012/04/introducing-ramone-c-library-for-web.html

Ramone: Consuming Hyper-Media REST Services in C# http://soabits.blogspot.com/2012/04/ramone-consuming-hyper-media-rest.html

JSON-Patch support in Ramone http://soabits.blogspot.dk/2013/01/json-patch-support-in-ramone.html

Using Ramone for OAuth2 authorization with Google APIs http://soabits.blogspot.dk/2013/03/using-ramone-for-oauth2-authorization.html

Asynchronous HTTP requests using Ramone http://soabits.blogspot.dk/2013/04/asynchronous-http-requests-using-ramone.html

The name "Ramone" was inspired by the character "Ramone" in the movie "Cars". In the movie Ramone is an easy going car. Hopefully you will find using the Ramone library just as easy going. You are of course also free to associate Ramone with the punk band "The Ramones" if that suits you better 😃

USING

Add a reference to the Ramone NuGet package and you are up and running.

BUILDING

Here is how to build Ramone from scratch:

  1. Download the source from GitHub (https://github.com/JornWildt/Ramone).
  2. Open "Ramone.sln" and build the whole project.
    • This builds the core Ramone.dll and additional test projects

SIMILAR PROJECTS

CONTACT

E-Mail: jw@elfisk.dk Twitter: @JornWildt

Please add bug reports as issues on GitHub, thanks.

CREDITS

Thanks to the OpenRasta (openrasta.org) and Restfulie (restfulie.caelum.com.br) projects for inspiration.

Thanks to cBrain (www.cbrain.com) for investing hours in the project.

Thanks to these contributers: https://github.com/prearrangedchaos https://github.com/poizan42

LICENSE

Ramone is distributed under the MIT License: http://www.opensource.org/licenses/MIT A copy of this license is included in the file LICENSE.TXT.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Ramone:

Package Downloads
Ramone.MediaTypes.Html

This package adds HTML reader support to Ramone.

Ramone.OAuth2

This package adds OAuth2 support to Ramone.

GitHubOAuth2Client-Redux

Provides an OAuth2 Client for authenticating with GitHub. Hooks into ASP.NET MVC 4 via DotNetOpenAuth. A Fork of GitHubOAuth2Client by jbubriski that adds additional features.

Ramone.MediaTypes.Atom

This package adds Atom feed (SyndicationFeed) support to Ramone.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Ramone:

Repository Stars
JornWildt/Mason
Documentation and examples for the Mason media type
Version Downloads Last updated
5.0.0 536 3/21/2024
4.1.5 1,299 11/5/2021
4.1.4 349 11/5/2021
4.1.3 632 6/11/2021
4.1.2 933 6/9/2021
4.1.1 379 6/9/2021
4.1.0 584 6/8/2021
4.0.0 888 5/27/2021
3.3.0 428 5/28/2021
3.2.2 1,488 8/6/2020
3.2.1.1 769 12/2/2019
3.2.1 949 12/2/2019
3.2.0 774 8/14/2019
3.1.2 1,371 8/23/2018
3.1.1 842 8/23/2018
3.1.0 1,047 5/7/2018
2.0.0 3,761 11/3/2014
1.3.1.79 1,328 1/25/2014
1.3.0.78 1,164 1/21/2014
1.3.0.77 1,272 10/3/2013
1.2.56 1,393 6/5/2013
1.1.0.47 1,294 4/12/2013
1.0.0.35 1,350 3/25/2013
1.0.0 1,252 3/25/2013

5.0.0 - Removed support for .NET Core 3.1.
             Update references to Newtonsoft.Json and Tavis.UriTemplates.
     4.2.0 - Use System.Net.Http.Headers.AuthenticationHeaderValue to parse authentication header.