How to call/Consume post API with Header in C#
This is simple sample code written to consume post API which has header Here I am using newtonsoft dll to convert class into json //using Newtonsoft.Json private void PostWithHeader() { WebRequest req = null ; WebResponse rsp = null ; string url = "http://" ; // Pass url here string API_Response = "" ; jsonParameter P = new jsonParameter () { userid=1}; try { req = WebRequest .Create(url); //Uncomment below line if Post with Basic auth also ...