VS Web Load test returning 415 Unsupported Media Type though Content-Type is specified as application/json

我是研究僧i 提交于 2020-01-02 08:52:43

问题


I am creating a Web Load test using VS. I am testing a service that I created using WebAPI. The WebAPI works well, I am now trying to do performance/load testing on it.

Here is a picture that shows how I have set up the test:

When I run the test, I get a 415 Unsupported Media Type response back.

Also, you can see that it states in the request that the Content-Type is there:

When inserting headers, I don't see Content-Type listed as one of the options so I just typed it in.

How do I correctly add Content-Type to my load test?


回答1:


From Microsoft's Documentation:

Expand the URL node in the editor, choose the String Body node and in the Content Type property enter a value...



来源:https://stackoverflow.com/questions/33485373/vs-web-load-test-returning-415-unsupported-media-type-though-content-type-is-spe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!