En ciertas ocasiones, al desarrollar una nueva comunicación entre APIs, es útil poder hacer logging de las peticiones y respuestas que se realizan desde un cliente REST.
En esta página se enumeran algunas alternativas para pintar esta información en el log de nuestra aplicación en Spring-Boot.
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
...
Es muy fácil de configurar pero proporciona poca información:
- No aparecen las cabeceras
- No aparece el body de la respuesta.
Configuración:
Añadir en el fichero application.properties:
| Bloque de código |
|---|
##Configuración RestTemplate para logging básico de request y response en clientes
logging |
...
.level.org.springframework.web.client.RestTemplate=DEBUG |
Cliente con RestTemplate:
| Bloque de código | ||
|---|---|---|
| ||
final RestTemplate plantilla = new RestTemplate(); final HttpHeaders headers = new HttpHeaders(); headers.set( "HeaderCabecera-test", "valueValor de test" ); headers.set( "OtherCabecera-Headertest2", "othervalueValor de test 2" ); final HttpEntity<String> entity = new HttpEntity<>( "body movin'Body de test", headers ); final String url = "https://micampusdesafundewebjsshowcasedesa.um.es/consultaexpedientes/restapi/v1.0/privatepublic/test/CS"; final ResponseEntity<String> response = plantilla.exchange( url, HttpMethod.GET, entity, String.class ); |
Ejemplo de log de petición:
| Bloque de código | ||
|---|---|---|
| ||
| Bloque de código | ||
| ||
13-05-2021 13:25:44.165 DEBUG 12864 --- [nio-8080-exec-1] o.s.w.c.RestTemplate : HTTP GET https://micampusdesafundewebjsshowcasedesa.um.es/consultaexpedientesapi/rest/v1.0/privatepublic/test/CS 13-05-2021 13:25:44.166 DEBUG 12864 --- [nio-8080-exec-1] o.s.w.c.RestTemplate : Accept=[text/plain, application/json, application/*+json, */*] 13-05-2021 13:25:44.166 DEBUG 12864 --- [nio-8080-exec-1] o.s.w.c.RestTemplate : Writing [body movin'Body de test] with org.springframework.http.converter.StringHttpMessageConverter 13-05-2021 13:25:44.197 DEBUG 12864 --- [nio-8080-exec-1] o.s.w.c.RestTemplate : Response 200 OK 13-05-2021 13:25:44.197 DEBUG 12864 --- [nio-8080-exec-1] o.s.w.c.RestTemplate : Reading to [java.lang.String] as "application/json" |
...
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 | ||
| Bloque de código | ||
| ||
13-05-2021 13:55:12.690 DEBUG 12864 --- [http-nio-8080-exec-4] o.a.h.c.p.RequestAddCookies : CookieSpec selected: default 1321-0510-2021 1309:5505:1245.690069 DEBUG 128642104 --- [http-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 /consultaexpedientesapi/rest/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: value 13-05Valor de test 21-10-2021 1309:5505:1247.699389 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers : http-outgoing-72 >> OtherCabecera-Header: othervalue 13-05test2: Valor 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: valueValor de 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-Header: othervaluetest2: Valor 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-72 << "HTTP/1.1 200 [\r][\n]" 13-05-2021 13:55:12.705 DEBUG 12864401 [\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 << "VarySet-Cookie: OriginJSESSIONID=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-05HTTP/1.1 401 21-10-2021 1309:5505:1247.705543 DEBUG 128642104 --- [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 12864Date: 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.wire headers : http-outgoing-72 << "Access-Control-Allow-Methods: GET, PUT, POST, DELETE, PATCH, OPTIONS[\r][\n]" 13-05-2021 13:55:12.705 DEBUG 12864Content-Type: application/json 21-10-2021 09:05:47.550 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.wire headers : 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.wire headers : 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-72 << HTTP/1.1 200 13-05Vary: 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.headersi.e.MainClientExec : Connection : http-outgoing-7 << Vary: Origin 13-05-2021 13:55:12.705 DEBUG 12864can be kept alive indefinitely 21-10-2021 09:05:47.587 DEBUG 2104 --- [http-nio-8080-exec-4] o.a.h.headers i.a.HttpAuthenticator : http-outgoing-7 << Vary: Access-Control-Request-Method 13-05Authentication required 21-10-2021 1309:5505:1247.705589 DEBUG 128642104 --- [http-nio-8080-exec-4] o.a.h.headers 4] o.a.h.i.a.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.i.a.headersHttpAuthenticator : Response contains no : http-outgoing-7 << X-Content-Type-Options: nosniff 13-05authentication challenges 21-10-2021 1309:5505:1247.705589 DEBUG 128642104 --- [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.headers.wire : 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 [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] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-7 << Access-Control-Allow-Methods2: GET,set PUT,socket POST,timeout DELETE, PATCH, OPTIONS 13-05to 0 21-10-2021 1309:5505:1247.705631 DEBUG 128642104 --- [http-nio-8080-exec-4] oh.ai.hc.headersPoolingHttpClientConnectionManager : : 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-CookieConnection released: [id: 2][route: {s}->https://fundewebjsshowcasedesa.um.es:443][total available: 1; route allocated: 1 of 5; total allocated: 1 of 10] |
Referencias:
...