com.github.estuaryoss.agent.component.ClientRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of agent Show documentation
Show all versions of agent Show documentation
RestAPI service which runs shell commands via REST API
The newest version!
package com.github.estuaryoss.agent.component;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Component;
@Component
public class ClientRequest {
private final HttpServletRequest httpServletRequest;
public ClientRequest(HttpServletRequest httpServletRequest) {
this.httpServletRequest = httpServletRequest;
}
public String getRequestUri() {
String fullRequestUri = httpServletRequest.getRequestURI() + "?";
if (httpServletRequest.getQueryString() != null)
return fullRequestUri + httpServletRequest.getQueryString();
return fullRequestUri;
}
public HttpServletRequest getRequest() {
return httpServletRequest;
}
}