我应该如何通过poster传递JSON字符串作为参数?
这是API,我想使用它:/templates/published?page=0&size=25&sort=credentialSchemaIdentifiers,asc&q=Health&filter=&filterDTO={"firstName":"DAN"}
但对于最后一个参数filterDTO
,它不会通过并返回错误请求
你最好试试这个
... /templates/published?page=0&size=25&sort=credentialSchemaIdentifiers,asc&q=Health&filter=
&filterDTOName=firstName&FilterDtoValue=DAN
或者你可以制作一个动作后
[HttpPost("~/templates/published")]
public ActionResult Published ([FromBody] Jobject filterDto, [FromQueryString] int page, int size, ...)
放入
{"firstName":"DAN"}
输入Postman正文,另一个参数输入url