public class NgrokAgent
extends java.lang.Object
ngrok agent.| Constructor and Description |
|---|
NgrokAgent(NgrokProcess ngrokProcess)
|
NgrokAgent(NgrokProcess ngrokProcess,
HttpClient httpClient)
Construct to interact with the
ngrok agent. |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteRequests()
Delete request history.
|
Response<AgentStatus> |
getAgentStatus()
Get the
ngrok agent status. |
Response<CapturedRequest> |
getRequest(java.lang.String requestId)
Get the given request.
|
Response<CapturedRequests> |
getRequests()
See
getRequests(String). |
Response<CapturedRequests> |
getRequests(java.lang.String tunnelName)
Get the list of requests made to either all tunnels, or the given tunnel name.
|
void |
replayRequest(java.lang.String requestId)
|
void |
replayRequest(java.lang.String requestId,
java.lang.String tunnelName)
Replay a given request through its original tunnel, or through a different given tunnel.
|
public NgrokAgent(NgrokProcess ngrokProcess)
ngrokProcess - The ngrok process.public NgrokAgent(NgrokProcess ngrokProcess, HttpClient httpClient)
ngrok agent.ngrokProcess - The ngrok process.httpClient - The HTTP client.public Response<AgentStatus> getAgentStatus()
ngrok agent status.public Response<CapturedRequests> getRequests()
getRequests(String).public Response<CapturedRequests> getRequests(java.lang.String tunnelName)
tunnelName - The optional tunnel name to filter by.public Response<CapturedRequest> getRequest(java.lang.String requestId)
requestId - The ID of the request to fetch.public void replayRequest(java.lang.String requestId)
public void replayRequest(java.lang.String requestId,
java.lang.String tunnelName)
requestId - The request ID.tunnelName - The optional name of tunnel to replay the request through.public void deleteRequests()