我在尝试从Postman发送请求到Class函数时遇到问题。
这是我的代码:
public ChargeInitResponse Post([FromBody]LocaliseChargeInit value)
{
if (value == null)
{
throw new HttpResponseException(HttpStatusCode.BadRequest);
}
ChargeInitResponse reply = new PaymentIntegrationService
{
ChargeInitRequest = value
}.PushChargeInit();
if (reply == null)
{
throw new HttpResponseException(HttpStatusCode.InternalServerError);
}
return reply;
}
ChargeInitResponse类
public class ChargeInitResponse
{
public string partnerTxID { get; set; }
public string request { get; set; }
public string ErrorMessage { get; set; }
}
LocaliseChargeInit类
public class LocaliseChargeInit : ChargeInit
{
public string CodeVerifier { get; set; }
public ServiceRequestHeader Header { get; set; }
}
ServiceRequestHeader类
public class ServiceRequestHeader
{
public string Authorization { get; set; }
public string Date { get; set; }
}
所以现在我的问题是我不知道如何通过邮递员向ChargeInitResponse Post
发出请求。你有什么建议吗?