ResponseEntity с HttpHeader - польские символы в сервисе Spring Boot - PullRequest
0 голосов
/ 30 сентября 2019

Как получить польские символы в HttpHeader?

HttpHeaders header = new HttpHeaders();
        header.setContentType(MediaType.APPLICATION_JSON_UTF8);
        header.set("errorMessage", "Polish characters: ążźół");
        header.add("Content-Type", "text/html; charset=utf-8");
        return ResponseEntity
                .status(HttpStatus.FORBIDDEN)
                .headers(header)
                .build();

Затем я хочу отобразить сообщение об ошибке mu на моем клиенте (Vue js):

.catch((error) => {
                        console.log(error.response.headers.errormessage);

У вас есть идеи?

...