App\Http\Controllers\Webapi\Tests\TestController@edit
app.js:279 GET .../webapi/test/2/edit 404 (Not Found)
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
function createDownloadLink(blob, encoding) {
var reader = new FileReader();
reader.readAsDataURL(blob)
reader.onloadend = function () {
var base64data = reader.result;
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
var param = "action="+String(base64data.slice(base64data.indexOf(',') + 1));
//var param = base64data;
//console.log(param);
xhr.open("POST", "search.php");
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.send(param);
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
if(JSON.parse(this.responseText)['answer']['result']){
document.getElementById("search").value=JSON.parse(this.responseText)['answer']['result'];
document.getElementById("searchButton").click();
}else{
alert('Голос не распознан');
}
}
});
}
}
blob:https://xn--80aaj5aiiy2b.xn--p1ai/ce8b1088-7f67-45...
function createDownloadLink(blob, encoding) {
var reader = new FileReader();
reader.readAsDataURL(blob)
reader.onloadend = function () {
var base64data = reader.result;
var data = null;
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
var param = base64data.slice(base64data.indexOf(',') + 1);
console.log(param);
xhr.open("GET", "search3.php?action="+param);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
xhr.send(null);
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
//document.getElementById('pppp').textContent=url;
}
}