当前位置: 首页 > 软件库 > 云计算 > >

AspNetCoreCurlMiddlewareExample

授权协议 Apache-2.0 License
开发语言 C#
所属分类 云计算
软件类型 开源软件
地区 不详
投 递 者 丌官运珧
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

AspNetCore Curl Middleware Example

Project demonstrates the capturing of ASP.NETCore HTTP Request and converting it as CURL files.

Use Case

As a back-end developer we would come across with different errors during runtime across multiple environments like QA, Staging, Production etc...In the modern era of micro-services the effort that we put to reproduce the same request and test in our local system has become a tedious process. In order to reduce the effort spent in reproducing a issue we could log the HTTP Request object as a curl request and save the request as files. These files can be pulled back into Postman or any other API testing tools and can be used to reproduce the issue a lot quicker than manually framing it.

Usage

Install the AspNetCoreCurlMiddleware package using the following command :

Install-Package AspNetCoreCurlMiddleware -Version 1.0.0 .

Add the extensions methods from the package in ConfigureServices and Configure methods of Startup.cs are :

services.AddSaveAsCurlMiddlewareServices(new Middleware.Models.SaveRequestOptions { LogPath = "request", SaveRequest = true });
app.UseSaveAsCurlMiddleware();

The SaveRequestOptions carries the input parameters for the curl builder you can customize the curl builder by extending the classes for your needs.

Buy Me A Coffee

相关阅读

相关文章

相关问答

相关文档