有没有办法以编程方式拒绝待处理的请求,我没有看到任何api,所以任何yammer专家都在那里帮忙?
从Chrome开发者工具我看到这是Yammer UI发送的请求。
https://www.yammer.com/****/join_requests/968249/deny
我们使用的代码:
WebRequest request = WebRequest.Create("https://www.yammer.com/****/join_requests/968249/deny");
request.Method = "POST";
string postData = "userId=" + userId;
byte[] byteArray = System.Text.Encoding.UTF8.GetBytes(postData);
// Set the ContentType property of the WebRequest.
request.ContentType = "application/x-www-form-urlencoded";
// Set the ContentLength property of the WebRequest.
request.ContentLength = byteArray.Length;
request.Headers.Add(HttpRequestHeader.Authorization, yammerToken);
// Get the request stream.
Stream dataStream = request.GetRequestStream();
// Write the data to the request stream.
dataStream.Write(byteArray, 0, byteArray.Length);
// Close the Stream object.
dataStream.Close();
// Get the response.
WebResponse response = request.GetResponse();
错误:找不到404,它的apv api不存在,所以任何解决方案
答案 0 :(得分:0)
没有支持的API可以执行此操作。