Xamarin.HttpConnection 1.0.4

A shared Xamarin wrapper binding for HttpClient

Install-Package Xamarin.HttpConnection -Version 1.0.4
dotnet add package Xamarin.HttpConnection --version 1.0.4
<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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Xamarin.HttpConnection, 1.0.4"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. 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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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);

    });

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);

    });

Release Notes

Modified the name of GetContentsFromURL function to GetContentsFromURLAsync

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 History

Version Downloads Last updated
1.0.4 1,390 2/10/2019
1.0.1 444 10/22/2018
1.0.0 506 8/1/2018