Hi
I have below code but i want to use RestSharp

Thanks
Hi
I have below code but i want to use RestSharp

Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jayraj ChhayaRank #304 · 8.2K reputationPosted Apr 17, 2024, 5:08 AM EDT
Hi,
// using RestSharp library for REST API calls var client = new RestClient("https://my.gstzen.in/~gstzen/a/post-einvoice-data/einvoice-json/"); var request = new RestRequest(Method.POST); // Replace with your authorization code request.AddHeader("Token", "de3a3&e37f14dc6"); // Replace with your E-Invoice JSON data request.AddParameter("application/json", "{ \"SellerDtls\":{\"Gstin\": \"27AP1ZT\"}}", ParameterType.RequestBody); var response = client.Execute(request);