The post request will not be submitted if the parameter is the default value #1485
Unanswered
jianminPei
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
if my request is suchs as:"{
"productId ":123,
type:0
}" .
the post cant not transfer type value. but I change it to " public int ? Type { get; set; }",the request is ok.
Thanks for helping me out.this is my code:
public class AsyncStateRequestDto
{
public string ProductId { get; set; }
public int Type { get; set; }
}
public interface ISMSProductApi : IJuaiApi
{
[Post("/stateUpdate")]
Task StateUpdateAsync([Body] AsyncStateRequestDto requestDto);
}
Beta Was this translation helpful? Give feedback.
All reactions