sending post request to REST over SSL in json from C# : i looked up every single page on google there was no clear answer
right now this is my code:`          try
            {
                var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://api.hesabit.com/oauth2/token");
                httpWebRequest.ContentType = "application/json";
                httpWebRequest.Method = "POST";
                httpWebRequest.Credentials = CredentialCache.DefaultCredentials;
                ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);

                string result_st;
                using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
                {
                    string json = "{\"code\":\"{atho code}\"," +
                                  "\"grant_type\":\"authorization_code\"," +
                                   "\"client_id\":\"{client_id}\"," +
                                    "\"client_secret\":\"{client_secret}\"," +
                                  "\"redirect_uri\":\"{redirect_uri}\"}";

                    streamWriter.Write(json);
                    streamWriter.Flush();
                    streamWriter.Close();
                }

                var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
                using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
                {
                    var result = streamReader.ReadToEnd();
                    result_st = result;
                }
                return result_st;
            }
            catch (Exception ex)
            {
                return ex.ToString();
            }

i really need to finish this today thank's 


  [1]: https://www.hesabit.com/docs/api/