WCF WebInvoke ResponseFormat

前端 未结 2 402
醉话见心
醉话见心 2021-01-13 08:19

I have a WCF restul service and I want to allow the user to choose what request format they want, i have the decorations

    [OperationContract]
    [WebInvo         


        
2条回答
  •  自闭症患者
    2021-01-13 09:05

    You can do this if your rest service is configured automatically select response type.

    Then on client request simply add needed header Accept: application/json

提交回复
热议问题