...
En esta página se enumeran algunas alternativas para pintar esta información en el log de nuestra aplicación en Spring-Boot.
| Info |
|---|
Esta página es la equivalente en Spring a la WiKi Logear Mensajes In/OUT en FundeWeb. |
Guía detallada
A continuación se detallan las distintas configuraciones que permiten realizar el logging de peticiones y respuestas en clientes REST.
1. Logging básico con RestTemplate
...
2. Logging completo con Apache HttpComponents.
Como puede observarse, el log pintado con el método anterior es bastante escueto y no proporciona demasiada información. En concreto, sería interesante que pintara el body de la respuesta.
Con este segundo método la información pintada es mucho más completa (incluso excesiva).
Configuración:
- Añadir en el fichero pom.xml la dependencia:
| Bloque de código | ||
|---|---|---|
| ||
<dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> |
...
- Añadir en el fichero application.properties:
| Bloque de código |
|---|
logging.level.org.apache.http=DEBUG |
...
logging.level.org.apache.http.wire=DEBUG |
Cliente con RestTemplate:
| Bloque de código | ||
|---|---|---|
| ||
final RestTemplate plantilla = new RestTemplate();
plantilla.setRequestFactory( new HttpComponentsClientHttpRequestFactory() ); //Configuración Apache HttpClient
final HttpHeaders headers = new HttpHeaders();
headers.set( "Cabecera-test", "Valor de test" );
headers.set( "Cabecera-test2", "Valor de test 2" );
final HttpEntity<String> entity = new HttpEntity<>( "Body de test", headers );
final String url = "https://fundewebjsshowcasedesa.um.es/api/v1.0/public/test/u";
final ResponseEntity re = plantilla.exchange( url, HttpMethod.GET, entity, String.class );
|
Ejemplo de log de petición:
En esta petición se ha forzado que el endpoint al que llama el cliente devuelva un error 401 para poder distinguir mejor el body de la respuesta.
| Bloque de código | ||
|---|---|---|
| ||
------------------------------------------ Log de la petición
21-10-2021 09:05:45.064 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.c.p.RequestAddCookies : CookieSpec selected: default
21-10-2021 09:05:45.069 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.c.p.RequestAuthCache : Auth | ||
| Bloque de código | ||
| ||
13-05-2021 13:55:12.690 DEBUG 12864 --- [nio-8080-exec-4] o.a.h.c.p.RequestAddCookies : CookieSpec selected: default 13-05-2021 13:55:12.690 DEBUG 12864 --- [nio-8080-exec-4] o.a.h.c.p.RequestAuthCache : Auth cache not set in the context 1321-0510-2021 1309:5505:1245.690072 DEBUG 128642104 --- [http-nio-8080-exec-4] h.i.c.PoolingHttpClientConnectionManager : Connection request: [route: {s}->https://micampusdesafundewebjsshowcasedesa.um.es:443][total available: 0; route allocated: 0 of 5; total allocated: 0 of 10] 1321-0510-2021 1309:5505:1245.690077 DEBUG 128642104 --- [http-nio-8080-exec-4] h.i.c.PoolingHttpClientConnectionManager : Connection leased: [id: 72][route: {s}->https://micampusdesafundewebjsshowcasedesa.um.es:443][total available: 0; route allocated: 1 of 5; total allocated: 1 of 10] 1321-0510-2021 1309:5505:1245.690080 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.i.e.MainClientExec : Opening connection {s}->https://micampusdesafundewebjsshowcasedesa.um.es:443 1321-0510-2021 1309:5505:1245.690084 DEBUG 128642104 --- [http-nio-8080-exec-4] .i.c.DefaultHttpClientConnectionOperator : Connecting to micampusdesafundewebjsshowcasedesa.um.es/155.54.228.131138:443 1321-0510-2021 1309:5505:1245.690086 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.c.s.SSLConnectionSocketFactory : Connecting socket to micampusdesafundewebjsshowcasedesa.um.es/155.54.228.131138:443 with timeout 0 1321-0510-2021 1309:5505:1245.692160 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.c.s.SSLConnectionSocketFactory : Enabled protocols: [TLSv1.2, TLSv1.1, TLSv1] 1321-0510-2021 1309:5505:1245.692165 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.c.s.SSLConnectionSocketFactory : Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV] 1321-0510-2021 1309:5505:1245.692179 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.c.s.SSLConnectionSocketFactory : Starting handshake 1321-0510-2021 1309:5505:1247.698361 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.c.s.SSLConnectionSocketFactory : Secure session established 1321-0510-2021 1309:5505:1247.698363 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.c.s.SSLConnectionSocketFactory : negotiated protocol: TLSv1.2 1321-0510-2021 1309:5505:1247.698365 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.c.s.SSLConnectionSocketFactory : negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 1321-0510-2021 1309:5505:1247.698368 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.c.s.SSLConnectionSocketFactory : peer principal: CN=micampusdesamncskubedesa.atica.um.es, OU=ATICA, O=Universidad de Murcia, L=Murcia, ST=Murcia, C=ES 1321-0510-2021 1309:5505:1247.698371 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.c.s.SSLConnectionSocketFactory : peer alternative names: [micampusdesamncskubedesa.atica.um.es, www.micampusdesafundewebjsshowcasedesa.um.es, verdacciodesa.um.es] 1321-0510-2021 1309:5505:1247.698376 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.c.s.SSLConnectionSocketFactory : issuer principal: CN=GEANT OV RSA CA 4, O=GEANT Vereniging, C=NL 1321-0510-2021 1309:5505:1247.698384 DEBUG 128642104 --- [http-nio-8080-exec-4] .i.c.DefaultHttpClientConnectionOperator : Connection established 155.54.67.188:58123<54720<->155.54.228.131138:443 1321-0510-2021 1309:5505:1247.698387 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.i.e.MainClientExec : Executing request GET /consultaexpedientes/restapi/v1.0/privatepublic/test/CSu HTTP/1.1 1321-0510-2021 1309:5505:1247.698389 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.i.e.MainClientExec : Target auth state: UNCHALLENGED 1321-0510-2021 1309:5505:1247.698389 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.i.e.MainClientExec : Proxy auth state: UNCHALLENGED 1321-0510-2021 1309:5505:1247.699389 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 >> GET /consultaexpedientes/restapi/v1.0/privatepublic/test/CSu HTTP/1.1 1321-0510-2021 1309:5505:1247.699389 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 >> Accept: text/plain, application/json, application/*+json, */* 1321-0510-2021 1309:5505:1247.699389 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 >> HeaderCabecera-test: Valor valuede test 1321-0510-2021 1309:5505:1247.699389 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 >> OtherCabecera-Headertest2: othervalue 13-05Valor de test 2 21-10-2021 1309:5505:1247.699408 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 >> Content-Type: text/plain;charset=ISO-8859-1 1321-0510-2021 1309:5505:1247.699411 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 >> Host: micampusdesafundewebjsshowcasedesa.um.es 1321-0510-2021 1309:5505:1247.699412 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 >> Connection: Keep-Alive 1321-0510-2021 1309:5505:1247.699412 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 >> User-Agent: Apache-HttpClient/4.5.1112 (Java/1.8.0_281301) 1321-0510-2021 1309:5505:1247.699412 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 >> Accept-Encoding: gzip,deflate 1321-0510-2021 1309:5505:1247.699412 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 >> "GET /consultaexpedientes/restapi/v1.0/privatepublic/test/CSu HTTP/1.1[\r][\n]" 1321-0510-2021 1309:5505:1247.699424 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 >> "Accept: text/plain, application/json, application/*+json, */*[\r][\n]" 1321-0510-2021 1309:5505:1247.699440 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 >> "HeaderCabecera-test: Valor valuede test[\r][\n]" 1321-0510-2021 1309:5505:1247.699450 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 >> "OtherCabecera-Headertest2: othervalueValor de test 2[\r][\n]" 1321-0510-2021 1309:5505:1247.699453 DEBUG 128642104 --- [[http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 >> "Content-Type: text/plain;charset=ISO-8859-1[\r][\n]" 1321-0510-2021 1309:5505:1247.699455 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 >> "Host: micampusdesafundewebjsshowcasedesa.um.es[\r][\n]" 1321-0510-2021 1309:5505:1247.699459 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 >> "Connection: Keep-Alive[\r][\n]" 1321-0510-2021 1309:5505:1247.699462 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 >> "User-Agent: Apache-HttpClient/4.5.1112 (Java/1.8.0_281301)[\r][\n]" 1321-0510-2021 1309:5505:1247.699465 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 >> "Accept-Encoding: gzip,deflate[\r][\n]" 1321-0510-2021 1309:5505:1247.699468 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 >> "[\r][\n]" ------------------------------------------------------------------------------------------------------------------------- Log de la respuesta => Dirección flechas "<<" --------------------------------------------- 13-05 Log del código de estado devuelto 21-10-2021 1309:5505:1247.704490 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-7 << "HTTP/1.1 200 [\r][\n]" 13-05-2021 13:55:12.705 DEBUG 12864 : http-outgoing-2 << "HTTP/1.1 401 [\r][\n]" ------------------------------------------ 21-10-2021 09:05:47.493 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Server: nginx/1.19.2Strict-Transport-Security: max-age=15768000; includeSubDomains[\r][\n]" 1321-0510-2021 1309:5505:1247.705496 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Date: Thu, 1321 MayOct 2021 1107:5505:1246 GMT[\r][\n]" 1321-0510-2021 1309:5505:1247.705499 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Content-Type: application/json[\r][\n]" 1321-0510-2021 1309:5505:1247.705502 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "ContentTransfer-LengthEncoding: 2chunked[\r][\n]" 1321-0510-2021 1309:5505:1247.705505 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Connection: keep-alive[\r][\n]" 1321-0510-2021 1309:5505:1247.705506 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Vary: Origin[\r][\n]" 1321-0510-2021 1309:5505:1247.705506 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Vary: Access-Control-Request-Method[\r][\n]" 1321-0510-2021 1309:5505:1247.705506 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Vary: Access-Control-Request-Headers[\r][\n]" 1321-0510-2021 1309:5505:1247.705506 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Vary: OriginSet-Cookie: JSESSIONID=8249A87231939143E042C26AA99C4D70; Path=/api; HttpOnly[\r][\n]" 1321-0510-2021 1309:5505:1247.705506 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Vary: Access-Control-Request-MethodX-Content-Type-Options: nosniff[\r][\n]" 1321-0510-2021 1309:5505:1247.705506 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Vary: Access-Control-Request-HeadersX-XSS-Protection: 1; mode=block[\r][\n]" 1321-0510-2021 1309:5505:1247.705524 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "X-Content-Type-Options: nosniffCache-Control: no-cache, no-store, max-age=0, must-revalidate[\r][\n]" 1321-0510-2021 1309:5505:1247.705527 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "X-XSS-Protection: 1; mode=blockPragma: no-cache[\r][\n]" 1321-0510-2021 1309:5505:1247.705529 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Cache-ControlExpires: no-cache, no-store, max-age=0, must-revalidate[\r][\n]" 1321-0510-2021 1309:5505:1247.705532 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "PragmaX-Frame-Options: no-cacheSAMEORIGIN[\r][\n]" 1321-0510-2021 1309:5505:1247.705534 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire : http-outgoing-72 << "Expires: 0[\r][\n]" 1321-0510-2021 1309:5505:1247.705539 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wire headers : http-outgoing-72 << "X-Frame-Options: SAMEORIGIN[\r][\n]" 13-05-2021 13:55:12.705 DEBUG 12864 HTTP/1.1 401 21-10-2021 09:05:47.543 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.wire headers : http-outgoing-72 << "AccessStrict-Control-Allow-Origin: *[\r][\n]" 13-05-2021 13:55:12.705 DEBUG 12864Transport-Security: max-age=15768000; includeSubDomains 21-10-2021 09:05:47.546 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.wire headers : http-outgoing-72 << "Access-Control-Allow-Credentials: true[\r][\n]" 13-05-2021 13:55:12.705 DEBUG 12864 Date: Thu, 21 Oct 2021 07:05:46 GMT 21-10-2021 09:05:47.548 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.wireheaders : http-outgoing-72 << "Access-Control-Allow-Methods: GET, PUT, POST, DELETE, PATCH, OPTIONS[\r][\n]" 13-05-2021 13:55:12.705 DEBUG 12864 Content-Type: application/json 21-10-2021 09:05:47.550 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.wireheaders : http-outgoing-72 << "Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Set-Cookie[\r][\n]" 13-05-2021 13:55:12.705 DEBUG 12864Transfer-Encoding: chunked 21-10-2021 09:05:47.553 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.wire headers : http-outgoing-72 << "[\r][\n]" 13-05Connection: keep-alive 21-10-2021 1309:5505:1247.705555 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.wireheaders : http-outgoing-72 << "CS" 13-05 Vary: Origin 21-10-2021 1309:5505:1247.705559 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-7 << HTTP/1.1 200 13-052 << Vary: Access-Control-Request-Method 21-10-2021 1309:5505:1247.705561 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 << ServerVary: nginx/1.19.2 13-05Access-Control-Request-Headers 21-10-2021 1309:5505:1247.705563 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 << DateSet-Cookie: Thu, 13 May 2021 11:55:12 GMT 13-05-2021 13:55:12.705 DEBUG 12864JSESSIONID=8249A87231939143E042C26AA99C4D70; Path=/api; HttpOnly 21-10-2021 09:05:47.566 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 << X-Content-Type-Options: application/jsonnosniff 1321-0510-2021 1309:5505:1247.705568 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 << ContentX-XSS-LengthProtection: 2 13-05 1; mode=block 21-10-2021 1309:5505:1247.705571 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 << Connection: keep-alive 13-05-2021 13:55:12.705 DEBUG 12864Cache-Control: no-cache, no-store, max-age=0, must-revalidate 21-10-2021 09:05:47.575 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 << VaryPragma: Originno-cache 1321-0510-2021 1309:5505:1247.705577 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 << VaryExpires: Access-Control-Request-Method 13-050 21-10-2021 1309:5505:1247.705579 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 << VaryX-Frame-Options: Access-Control-Request-Headers 13-05SAMEORIGIN 21-10-2021 1309:5505:1247.705584 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers i.e.MainClientExec : Connection can be kept : http-outgoing-7 << Vary: Origin 13-05alive indefinitely 21-10-2021 1309:5505:1247.705587 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.i.a.headersHttpAuthenticator : http-outgoing-7 << Vary: Access-Control-Request-Method 13-05-2021 13:55:12.705 DEBUG 12864: Authentication required 21-10-2021 09:05:47.589 DEBUG 2104 --- [[http-nio-8080-exec-4] o.a.h.i.headersa.HttpAuthenticator : http-outgoing-7 << Vary: Access-Control-Request-Headers 13-05-2021 13:55:12.705 DEBUG 12864: fundewebjsshowcasedesa.um.es:443 requested authentication 21-10-2021 09:05:47.589 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.headersi.a.HttpAuthenticator : Response contains : http-outgoing-7 << X-Content-Type-Options: nosniff 13-05-2021 13:55:12.705 DEBUG 12864no authentication challenges 21-10-2021 09:05:47.589 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.c.p.headersResponseProcessCookies : Cookie accepted [JSESSIONID="8249A87231939143E042C26AA99C4D70", version:0, : http-outgoing-7 << X-XSS-Protection: 1; mode=block 13-05-2021 13:55:12.705 DEBUG 12864domain:fundewebjsshowcasedesa.um.es, path:/api, expiry:null] 21-10-2021 09:05:47.609 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.headerswire : http-outgoing-72 << Cache-Control: no-cache, no-store, max-age=0, must-revalidate 13-05-2021 13:55:12.705 DEBUG 12864 --- [nio-8080-exec-4] o.a.h.headers : http-outgoing-7 << Pragma: no-cache 13-05-2021 13:55:12.705 DEBUG 12864"a0[\r][\n]" ---------------------------- Log con Body de la respuesta 21-10-2021 09:05:47.613 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.headerswire : http-outgoing-7 << Expires: 0 13-05-2021 13:55:12.705 DEBUG 12864 --- [nio-8080-exec-4] o.a.h.headers : http-outgoing-2 << "{"fecha":"21/10/2021 07:05:46","estado":"UNAUTHORIZED","mensaje":"No tiene acceso para solicitar : http-outgoing-7 << X-Frame-Options: SAMEORIGIN 13-05-2021 13:55:12.705 DEBUG 12864este servicio","tipoRespuesta":"CUSTOM_DefaultErrorAttributes"}[\r][\n]" ----------------------------- 21-10-2021 09:05:47.618 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.headerswire : http-outgoing-72 << Access-Control-Allow-Origin: * 13-05"0[\r][\n]" 21-10-2021 1309:5505:1247.705620 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headerswire : http-outgoing-72 << Access-Control-Allow-Credentials: true 13-05"[\r][\n]" 21-10-2021 1309:5505:1247.705625 DEBUG 128642104 --- [http-nio-8080-exec-4] oh.ai.hc.headersPoolingHttpClientConnectionManager : Connection : http-outgoing-7 << Access-Control-Allow-Methods: GET, PUT, POST, DELETE, PATCH, OPTIONS 13-05-2021 13:55:12.705 DEBUG 12864[id: 2][route: {s}->https://fundewebjsshowcasedesa.um.es:443] can be kept alive indefinitely 21-10-2021 09:05:47.628 DEBUG 2104 --- [http-nio-8080-exec-4] oh.ai.hc.headersDefaultManagedHttpClientConnection : http-outgoing-2: set socket timeout to 0 21-10-2021 09:05:47.631 DEBUG 2104 --- [http-nio-8080-exec-4] h.i.c.PoolingHttpClientConnectionManager : Connection released: [id: 2][route: {s}->https://fundewebjsshowcasedesa.um.es:443][total available: 1; route allocated: 1 of 5; total allocated: http-outgoing-7 << Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,Set-Cookie1 of 10] |
Referencias:
...