- fix Indexdb:

1) ReadAllData 'GET'  : OK
 2) InsertTodo 'POST'  : OK
 3) DeleteItem 'DELETE': OK
 4) Modify     'PATCH' : OK
This commit is contained in:
Paolo Arena
2019-02-03 00:51:58 +01:00
parent 185bd2657d
commit 5db5fb7dd0
5 changed files with 77 additions and 65 deletions

View File

@@ -1,6 +1,6 @@
import axios, { AxiosInstance, AxiosPromise, AxiosResponse, AxiosInterceptorManager } from 'axios'
async function sendRequest (url: string, lang: string, mytok: string, method: string, mydata: any) {
async function sendRequest(url: string, lang: string, mytok: string, method: string, mydata: any) {
console.log('sendRequest', method, url, '[', lang, ']')
@@ -18,6 +18,12 @@ async function sendRequest (url: string, lang: string, mytok: string, method: st
cache: 'no-cache',
headers: authHeader
}
} else if (method === 'DELETE') {
configInit = {
method: method,
cache: 'no-cache',
headers: authHeader
}
} else {
configInit = {
method: method,