HTTP PUT not allowed in ASP.NET Web API

前端 未结 6 1183
一生所求
一生所求 2020-11-30 04:18

On my Web API project, I cannot perform an HTTP PUT to my resources. I\'ve read through some similar questions on this problem and I\'ve followed the recommende

6条回答
  •  醉梦人生
    2020-11-30 04:34

    For me it was because I had not set the media type in the json content string for my http client request:

    new StringContent(json, Encoding.UTF32, "application/json");

    All sorts of weird behavior if this is not set.

提交回复
热议问题