0

C# を使用して、Freshdesk ソリューション記事を自動的に更新するプログラムを作成していますが、コードを実行すると例外なく実行されますが、記事は更新されません。どこが間違っているのか誰か教えてもらえますか?

apiPath = $"/api/v2/solutions/articles/{articleID}";

string publishArticle = "{\"description\" : \"publish article\", \"status\" : 2}";

                request = (HttpWebRequest)WebRequest.Create("https://" + fdDomain + ".freshdesk.com" + apiPath);
                request.ContentType = "application/json";
                request.Method = "PUT";
                byte[] byteArray = Encoding.UTF8.GetBytes(publishArticle);
                request.ContentLength = byteArray.Length;
                request.Headers["Authorization"] = "Basic " + authInfo;


                using (var dataStream = request.GetRequestStream())
                {
                    dataStream.Write(byteArray, 0, byteArray.Length);
                }

4

0 に答える 0