magutierrm commented on issue #1993:
URL: https://github.com/apache/jena/issues/1993#issuecomment-1682698873

   Is not being called, Not sure if I am doing something wrong
   ```java
   @Slf4j
   @Component
   public class Test {
   
       @PostConstruct
       public void init() throws InterruptedException, IOException {
   
           HttpRequestModifier modifier = (params, headers) -> {
               System.err.println("CALLED");
               headers.put("x-test", "test");
           };
           
RegistryRequestModifier.get().addPrefix("https://github.com/status/";, modifier);
   
           HttpClient httpClient = HttpClient.newBuilder().build();
           HttpResponse<String> response = httpClient.send(
               HttpRequest.newBuilder()
                          .GET()
                          .uri(URI.create("https://github.com/status/";))
                          .build(),
               HttpResponse.BodyHandlers.ofString()
           );
   
           log.info("Request {}", response.request());
           log.info("Response {}", response);
           log.info("Headers {}", response.request().headers().map());
       }
   
   }
   ```
   
   Logs:
   ```
   2023-08-17 12:07:52.810 - INFO 25359 --- [           main] 
com.xxx.xxx.neptune.config.Test      : Request https://github.com/status/ GET
   2023-08-17 12:07:52.811 - INFO 25359 --- [           main] 
com.xxx.xxx.neptune.config.Test      : Response (GET 
https://github.com/status/) 200
   2023-08-17 12:07:52.811 - INFO 25359 --- [           main] 
com.xxx.xxx.neptune.config.Test      : Headers {}
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to