Skip to content

Commit

Permalink
aaaaaaaaaaaaa
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Sikina committed Nov 1, 2024
1 parent b330f2a commit 19d53a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@OpenAPIDefinition(info = @Info(title = "Pic-sure API", version = "1.0.0", description = "This is the Pic-sure API."))
@Path("/")
@Produces("application/json")
@Consumes("application/json")
public class PicsureRS {

private static final Logger log = LoggerFactory.getLogger(PicsureRS.class);
@Inject
PicsureInfoService infoService;

Expand Down Expand Up @@ -203,6 +206,7 @@ public Response generateContinuousBin(QueryRequest continuousData, @Context Http
}



@POST
@Path("/proxy/{container}/{request : .+}")
@Operation(hidden = true)
Expand All @@ -216,7 +220,10 @@ public Response postProxy(
@Path("/proxy/{container}/{request : .+}")
@Operation(hidden = true)
public Response getProxy(@PathParam("container") String containerId, @PathParam("request") String request, @Context UriInfo uriInfo) {
return proxyWebClient.getProxy(containerId, request, uriInfo.getQueryParameters());
log.info("Starting {}", uriInfo.getQueryParameters());
Response p = proxyWebClient.getProxy(containerId, request, uriInfo.getQueryParameters());
log.info("Returning {}", uriInfo.getQueryParameters());
return p;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ public Response getProxy(String containerId, String path, MultivaluedMap<String,
URI uri =
new URIBuilder().setScheme("http").setHost(containerId).setPath(path).setParameters(processParams(queryParams)).build();
HttpGet request = new HttpGet(uri);
return getResponse(request);
LOG.info("Getting response");
Response response = getResponse(request);
LOG.info("Done getting response");
return response;
} catch (URISyntaxException e) {
LOG.warn("Failed to construct URI. Container: {} Path: {}", containerId, path);
throw new RuntimeException(e);
Expand Down

0 comments on commit 19d53a1

Please sign in to comment.