You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
43 lines
1.3 KiB
4 years ago
|
using System;
|
||
|
|
||
|
namespace MatrixDotNetLib
|
||
|
{
|
||
|
public class MatrixFileInfo
|
||
|
{
|
||
|
public Int64 size { get; set; }
|
||
|
|
||
|
public string MimeType { get; set; }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
//// simplest implementation
|
||
|
//// might not work for UWP
|
||
|
//// sauce: https://stackoverflow.com/questions/5527316/how-to-set-the-content-of-an-httpwebrequest-in-c
|
||
|
//HttpContent requestContent = new StringContent(requestJson, Encoding.UTF8, "application/json");
|
||
|
|
||
|
//HttpClient client = new HttpClient();
|
||
|
//client.BaseAddress = new Uri(loginUrl);
|
||
|
//client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||
|
|
||
|
//HttpResponseMessage responseMessage = client.PostAsync(loginUrl, requestContent).Result;
|
||
|
//string responseString = responseMessage.Content.ReadAsStringAsync().Result;
|
||
|
|
||
|
//if(responseString.Contains("errcode"))
|
||
|
//{
|
||
|
// // deserialize into error object
|
||
|
// MatrixError error = JsonConvert.DeserializeObject<MatrixError>(responseString);
|
||
|
|
||
|
// // convert error object to a string
|
||
|
// string errMsg = error.ErrorCode + ": " + error.ErrorMessage;
|
||
|
|
||
|
// // throw exception (can be caught and handled gracefully)
|
||
|
// throw new Exception(errMsg);
|
||
|
//}
|
||
|
//else
|
||
|
//{
|
||
|
// MatrixLoginResponse response = JsonConvert.DeserializeObject<MatrixLoginResponse>(responseString);
|
||
|
|
||
|
// return response;
|
||
|
//}
|