Exemple #1
0
        public async static Task <ClsDBResponse> PutDataAsync(string pPath, string pKey, dynamic pValue)
        {
            Console.WriteLine("PUT: " + pPath + " key: " + pKey + " value: " + pValue);
            ClsDBResponse dbResponse = await ClsDBConnector.RequestAsync(pPath, Method.PUT, pKey, pValue);

            return(dbResponse);
        }
Exemple #2
0
        public async static Task <ClsDBResponse> GetDataAsync(string pPath)
        {
            Console.WriteLine("GET: " + pPath);
            ClsDBResponse dbResponse = await ClsDBConnector.RequestAsync(pPath, Method.GET, "", "");

            return(dbResponse);
        }
Exemple #3
0
        public async static Task <ClsDBResponse> DeleteDataAsync(string pPath, string pKey, dynamic pValue)
        {
            //I spent a hour or more trying to use the DELETE request to delete on the database, but apparently the DELETE request does not support body variables
            //So for the sake of not redoing the a large part of the API, im using PATCH
            Console.WriteLine("DELETE: " + pPath + " key: " + pKey + " value: " + pValue);
            ClsDBResponse dbResponse = await ClsDBConnector.RequestAsync(pPath, Method.PATCH, pKey, pValue);

            return(dbResponse);
        }