com.hubspot.chrome.devtools.client.core.network.RequestInterceptedEvent Maven / Gradle / Ivy
package com.hubspot.chrome.devtools.client.core.network;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hubspot.chrome.devtools.client.core.Event;
import com.hubspot.chrome.devtools.client.core.page.FrameId;
import com.hubspot.chrome.devtools.client.core.page.ResourceType;
/**
* Details of an intercepted HTTP request, which must be either allowed, blocked, modified or
* mocked.
*/
public final class RequestInterceptedEvent extends Event {
private InterceptionId interceptionId;
private Request request;
private FrameId frameId;
private ResourceType resourceType;
private Boolean isNavigationRequest;
private String redirectUrl;
private AuthChallenge authChallenge;
private ErrorReason responseErrorReason;
private Integer responseStatusCode;
private Headers responseHeaders;
@JsonCreator
public RequestInterceptedEvent(@JsonProperty("interceptionId") InterceptionId interceptionId,
@JsonProperty("request") Request request, @JsonProperty("frameId") FrameId frameId,
@JsonProperty("resourceType") ResourceType resourceType,
@JsonProperty("isNavigationRequest") Boolean isNavigationRequest,
@JsonProperty("redirectUrl") String redirectUrl,
@JsonProperty("authChallenge") AuthChallenge authChallenge,
@JsonProperty("responseErrorReason") ErrorReason responseErrorReason,
@JsonProperty("responseStatusCode") Integer responseStatusCode,
@JsonProperty("responseHeaders") Headers responseHeaders) {
this.interceptionId = interceptionId;
this.request = request;
this.frameId = frameId;
this.resourceType = resourceType;
this.isNavigationRequest = isNavigationRequest;
this.redirectUrl = redirectUrl;
this.authChallenge = authChallenge;
this.responseErrorReason = responseErrorReason;
this.responseStatusCode = responseStatusCode;
this.responseHeaders = responseHeaders;
}
public InterceptionId getInterceptionId() {
return interceptionId;
}
public Request getRequest() {
return request;
}
public FrameId getFrameId() {
return frameId;
}
public ResourceType getResourceType() {
return resourceType;
}
public Boolean getIsNavigationRequest() {
return isNavigationRequest;
}
public String getRedirectUrl() {
return redirectUrl;
}
public AuthChallenge getAuthChallenge() {
return authChallenge;
}
public ErrorReason getResponseErrorReason() {
return responseErrorReason;
}
public Integer getResponseStatusCode() {
return responseStatusCode;
}
public Headers getResponseHeaders() {
return responseHeaders;
}
}