i have two methods in webapi .one method is used for passing the data through the body at the time i can possible to pass through body in json format and also another method for passing the data through header in json format but i need to combine both json response to single jsonobject format how can do this.many of examples i seen it's not worked for me.please help me.
Body data code:
- [Httppost]
- [Route("api/Account/Login")]
- public async task
Login([From body]LoginRequest request) - {
- return response;
- }
- private HttpWebRequest CreateRequestObject(string ServiceURL)
- {
- HttpWebRequest request=null;
- try
- {
- var _authkey=configurationManger.APPSetting["userkey"];
- request=(HttpWebRequest)WebRequest.Create(ServiceURL)
- request.Method="Post";
- request.ContentType="Application/Json";
- request.Headers.Add("AuthKey",_authkey);
- }
- catch(Exception ex)
- {
- }
- return request
- }
please help me,
Thank u.
Thank u.
Madan ShekarPosted Dec 5, 2018, 3:22 AM
Jignesh KumarPosted Nov 20, 2018, 7:24 AM