XDev.Square.OkHttp3.Sse 5.0.0.1

dotnet add package XDev.Square.OkHttp3.Sse --version 5.0.0.1
                    
NuGet\Install-Package XDev.Square.OkHttp3.Sse -Version 5.0.0.1
                    
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="XDev.Square.OkHttp3.Sse" Version="5.0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XDev.Square.OkHttp3.Sse" Version="5.0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="XDev.Square.OkHttp3.Sse" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add XDev.Square.OkHttp3.Sse --version 5.0.0.1
                    
#r "nuget: XDev.Square.OkHttp3.Sse, 5.0.0.1"
                    
#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.
#:package XDev.Square.OkHttp3.Sse@5.0.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=XDev.Square.OkHttp3.Sse&version=5.0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=XDev.Square.OkHttp3.Sse&version=5.0.0.1
                    
Install as a Cake Tool

Introduction

Nuget packaging for the okhttp-sse (Server-Sent Events) native java/kotlin dependency. This package is named XDev.Square.OkHttp3.Sse and rolls up the single native lib com.squareup.okhttp3:okhttp-sse. The "XDev" root in the package name allows room for Square/Microsoft to publish an official NuGet package in the future, and allows simple replacement of this one for that one, if that ever occurs.

okhttp-sse is a transitive requirement of ktor-client-okhttp in Ktor 3 (SSE support for the OkHttp engine); no existing NuGet wrapper carries it, so this package fills that gap.

Latest release <a href="https://www.nuget.org/packages/XDev.Square.OkHttp3.Sse"> <img src="https://img.shields.io/nuget/v/XDev.Square.OkHttp3.Sse"></a>

Latest build    <a href="https://www.nuget.org/packages/XDev.Square.OkHttp3.Sse"> <img src="https://img.shields.io/nuget/vpre/XDev.Square.OkHttp3.Sse"></a>

source repo

<br>

The native lib in maven:

native repo: https://github.com/square/okhttp

Getting Started

To use this nuget package, just install the desired version as you normally install nuget packs.

  • Note this repo repackages the okhttp-sse jar into XDev.Square.OkHttp3.Sse.aar to support android.
  • It depends on the published Square.OkHttp3.JVM (native okhttp-jvm) and Xamarin.Kotlin.StdLib packages.

Build and Test

https://learn.microsoft.com/en-us/dotnet/android/features/maven/android-maven-library

Versions

Contribute

If you need a different/newer version, PR, or open an issue in the .Net repo! https://dev.azure.com/xdevapps/Android%20bindings/_git/XDev.Jetbrains.InteropLibs

Product Compatible and additional computed target framework versions.
.NET net8.0-android34.0 is compatible.  net9.0-android was computed.  net10.0-android was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.0.1 39 6/3/2026
4.12.0.1 49 6/2/2026

Uses the published MS package Square.OkHttp3 as a dependency so that we're compatible with Maui-targeted apps.
     Note: if MS ever releases an official okhttp-sse package (as they currently do for Square.OkHttp3), it may
     collide with this one and cause java-c (Java compile) errors in consuming apps from the same Java class
     definition being found twice. The intent at that point is to deprecate this package and defer to the
     Xamarin/MS-sourced package.