Xamarin.HttpConnection 1.0.4

dotnet add package Xamarin.HttpConnection --version 1.0.4                
NuGet\Install-Package Xamarin.HttpConnection -Version 1.0.4                
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="Xamarin.HttpConnection" Version="1.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xamarin.HttpConnection --version 1.0.4                
#r "nuget: Xamarin.HttpConnection, 1.0.4"                
#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 Xamarin.HttpConnection as a Cake Addin
#addin nuget:?package=Xamarin.HttpConnection&version=1.0.4

// Install Xamarin.HttpConnection as a Cake Tool
#tool nuget:?package=Xamarin.HttpConnection&version=1.0.4                

HttpConnection

A shared Xamarin wrapper binding for HttpClient

Usage:

    using Subsystems.HttpConnection.External;
    
    ...
    ...

Initialize

    1.  var httpConnectionProxy = new CMPHttpConnectionProxy();
        httpConnectionProxy.URL("http://www.google.com").Build();
        
    2. var httpClientProxy = new CMPHttpConnectionProxy();
        httpClientProxy.URL($"<URL>")
                       .Headers("<Header_Key1>", "<Header_Value1>")
                       .Headers("<Header_Key2>", "<Header_Value2>")
                       .JsonBody("<Body_Key1>", "<Body_Value1>")
                       .JsonBody("<Body_Key2>", "<Body_Value2>")
                       .Build();
    

GetAsync

    var httpResponse = await httpConnectionProxy.GetAsync();
    Console.WriteLine(httpResponse.ResponseString);
    

PostAsync

    var httpResponse = await httpConnectionProxy.PostAsync();
    Console.WriteLine(httpResponse.ResponseString);
    

PutAsync

    var httpResponse = await httpConnectionProxy.PutAsync();
    Console.WriteLine(httpResponse.ResponseString);
    

DeleteAsync

    var httpResponse = await httpConnectionProxy.DeleteAsync();
    Console.WriteLine(httpResponse.ResponseString);
    

GetBytesWithProgressAsync

    await cl.GetBytesWithProgressAsync((httpResponse, progressBytes, totalBytes) =>
    {

        responseString = string.Concat(responseString, httpResponse.ResponseString);
        Console.WriteLine("Response:" + responseString);
        Console.WriteLine("progressBytes: " + progressBytes + "\ntotalBytes: " + totalBytes);

    });
Product Compatible and additional computed target framework versions.
MonoAndroid monoandroid81 is compatible. 
Xamarin.iOS xamarinios10 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Xamarin.HttpConnection:

Package Downloads
Xamarin.ImageLoader

A Reusable component to Download Image directly from URL. This also supportes Caching the downloaded images efficiently

Xamarin.ShareQuick

A Xamarin wrapper around Xaamrin.Auth APIs to share in Social Media(Facebook &amp; Twitter for now)

Xamarin.CustomImageView.iOS

A custom ImageView component for iOS with inteligent Caching, Handle Cache expiry, Automatic Download

Xamarin.CustomMapView.Droid

A Xamarin wrapper around Google Map APIs for Droid

Xamarin.CustomMapView.iOS

A Xamarin wrapper around Google Map APIs for iOS

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 3,792 2/10/2019
1.0.1 808 10/22/2018
1.0.0 885 8/1/2018

Modified the name of GetContentsFromURL function to GetContentsFromURLAsync