I use fetch (in React) with the DELETE method, execute a query with line (api understands the given value)
name-%{[@timestamp]}-1970.01.01
fetch(`/api/apiname/name-%{[@timestamp]}-1970.01.01`, {
method: 'delete',
headers: {
'Content-Type': 'application/json;charset=utf-8',
Authorization: `Bearer ${Token}`
}
})
like this, but when requested, I get characters in query line
Request URL: http://localhost:3000/api/apiname/name-%%7B[@timestamp]%7D-1970.01.01
that prevent it from being executed, how can I fix this?
I tried to use decodeURI but it didn't help
P.S. I need the request to be
http://localhost:3000/api/apiname/name-%{[@timestamp]}-1970.01.01
but not
http://localhost:3000/api/apiname/name-%%7B[@timestamp]%7D-1970.01.01