Test 添加test 测试方法

master
nodyang@aliyun.com 2 months ago
parent ca8613082d
commit 996910a2cd

@ -2,12 +2,14 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Logging;
using SlnMesnac.Model.domain;
using SlnMesnac.Repository.service;
using SlnMesnac.Repository.service.LogImpl;
using SlnMesnac.Repository.service.ScanLog;
using TouchSocket.Core;
using TouchSocket.Http;
using TouchSocket.Rpc;
using TouchSocket.WebApi;
@ -37,6 +39,22 @@ namespace SlnMesnac.TouchSocket
[EnableCors("cors")]
[WebApi(HttpMethodType.POST)]
public string Test(IWebApiCallContext callContext)
{
//http内容
var httpContext = callContext.HttpContext;
//http请求
var request = httpContext.Request;
var str = request.GetBody();
return str;
}
[EnableCors("cors")]
[WebApi(HttpMethodType.POST)]

Loading…
Cancel
Save