Answer the question
In order to leave comments, you need to log in
Ajax request will return °Ð·Ð°Ð½Ð½Ñ‹Ð¹ емейД instead of Cyrillic?
The server is displaying a message in the appropriate language
header('Content-Type: text/html; charset=utf-8');
// или
header('Content-type: text/plain; charset=utf-8');
return __('auth.email_not_confirmed');
// вернет
Указанный емейл не подтвержден
return response()->json(__('auth.email_not_confirmed'));
// вернет
\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0435\u043c\u0435\u0439\u043b \u043d\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d
window.axios.post(this.formRoute, dataForm)
.then((response) => {
....
window.axios.defaults.headers.common = {
'X-CSRF-TOKEN': window.Laravel.csrfToken, // set by default CSRF token for all request
'X-Requested-With': 'XMLHttpRequest',
'Charset': 'utf-8',
};
Accept:*/*
Accept-Encoding:gzip, deflate
Accept-Language:ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4,de;q=0.2,uk;q=0.2,da;q=0.2
Cache-Control:no-cache
Connection:keep-alive
Content-Length:438
Content-Type:application/json;charset=UTF-8
Cache-Control:no-cache, private
Connection:keep-alive
Content-Type:application/json
Date:Thu, 19 Oct 2017 06:42:43 GMT
phpdebugbar-id:b7bd3891919aa3d3a41f3b2017ee2a88
Server:nginx/1.11.9
Set-Cookie:XSRF-TOKEN=eyJp
expires=Thu, 19-Oct-2017 08:42:43 GMT; Max-Age=7200; path=/
Set-Cookie:laravel_session=eyJpdijlhZiJ9; expires=Thu, 19-Oct-2017 08:42:43 GMT; Max-Age=7200; path=/; HttpOnly
Transfer-Encoding:chunked
<!DOCTYPE html>
<html lang="{{ config('app.locale') }}">
// на момент запроса lang="ru"
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="all"/>
<meta name="googlebot" content="index, follow">
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question