Upload JSON via WebClient

前端 未结 2 1815
后悔当初
后悔当初 2021-01-17 23:48

I have a web app with that is using JQuery to interact with my backend. The backend successfully accepts JSON data. For instance, I can successfully send the following JSON:

2条回答
  •  庸人自扰
    2021-01-18 00:34

    Figured it out. I was forgetting the following:

    myService.Headers.Add("Content-Type", "application/json");
    

提交回复
热议问题