Beispiel #1
0
        public static async Task <SMResponse> get(String path)
        {
            string responseString = await getResponseString(path);

            SMResponse m = JsonConvert.DeserializeObject <SMResponse>(responseString);

            return(m);
        }
Beispiel #2
0
        public static async Task <SMResponse> put(string path, SMRequest request)
        {
            string json = JsonConvert.SerializeObject(request, Formatting.Indented,
                                                      new JsonSerializerSettings {
                DefaultValueHandling = DefaultValueHandling.Ignore, NullValueHandling = NullValueHandling.Ignore
            });
            string responseString = await putResponseString(path, json);

            SMResponse m = JsonConvert.DeserializeObject <SMResponse>(responseString);

            return(m);
        }