This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17688|Reply: 3

[WebAPI] Which great god has encountered this problem?

[Copy link]
Posted on 11/9/2018 12:41:05 PM | | | |
I wrote a webapi interface by myself, and an error was reported when the request passed






Previous:.net/c# call to code the source code of the platform
Next:10,000 sets of PPT templates to share with everyone, take them away if you need them!
Posted on 11/9/2018 1:04:07 PM |
This is not a WebAPI issue. WebAPI provides MediaTypeFormatters for 'application/x-www-form-urlencoded'. This issue is due to some implementation of the Abp.WebApi package that is outdated. Update your aspnet boilerplate package to Abp v1.0, which was released on September 28, 2016. Fix broken code. and recompiled. This issue should be resolved. If you still have questions, please contact me and maybe I can help.
Posted on 11/9/2018 1:08:24 PM |
The default method of the POST interface Content-Type is application/x-www-form-urlencoded. This is typical of what a browser would use for a normal POST.

If the content of your post is a json string, try modifying it

Content-Type: application/json
Posted on 11/9/2018 1:24:17 PM |
Usually the POST is json
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com