Abstractions for building custom Dev Proxy plugins. Dev Proxy is an API simulator that helps you effortlessly test your app beyond the happy path.
This package provides the interfaces, base classes, and models needed to build custom Dev Proxy plugins. Use it when you want to extend Dev Proxy with your own functionality.
Create a new class library project and add a reference to this package:
dotnet add package DevProxy.AbstractionsThen, implement the IPlugin interface or inherit from BasePlugin:
using DevProxy.Abstractions.Plugins;
using DevProxy.Abstractions.Proxy;
using Microsoft.Extensions.Logging;
public class MyPlugin(
ILogger logger,
ISet<UrlToWatch> urlsToWatch) : BasePlugin(logger, urlsToWatch)
{
public override string Name => nameof(MyPlugin);
public override async Task BeforeRequestAsync(
ProxyRequestArgs e,
CancellationToken cancellationToken)
{
// Your custom logic here
}
}For more information, see the Dev Proxy documentation.