java.lang.Object
java.lang.Record
org.htmlunit.javascript.host.fetch.CorsLoader.Result
- Record Components:
response- the responseurl- the url of the responseredirected- whether a redirect was followedcorsTainting- whether an url of another origin was involved (response tainting 'cors' or, for the request mode 'no-cors', 'opaque')opaqueRedirect- whether the response is a redirect returned because ofCorsLoader.RedirectMode.MANUAL
- Enclosing class:
- CorsLoader
public static record CorsLoader.Result(WebResponse response, URL url, boolean redirected, boolean corsTainting, boolean opaqueRedirect)
extends Record
The result of
CorsLoader.load(WebRequest, boolean).-
Constructor Summary
ConstructorsConstructorDescriptionResult(WebResponse response, URL url, boolean redirected, boolean corsTainting, boolean opaqueRedirect) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecorsTaintingrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theopaqueRedirectrecord component.booleanReturns the value of theredirectedrecord component.response()Returns the value of theresponserecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
Result
public Result(WebResponse response, URL url, boolean redirected, boolean corsTainting, boolean opaqueRedirect) Creates an instance of aResultrecord class.- Parameters:
response- the value for theresponserecord componenturl- the value for theurlrecord componentredirected- the value for theredirectedrecord componentcorsTainting- the value for thecorsTaintingrecord componentopaqueRedirect- the value for theopaqueRedirectrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
response
Returns the value of theresponserecord component.- Returns:
- the value of the
responserecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
redirected
public boolean redirected()Returns the value of theredirectedrecord component.- Returns:
- the value of the
redirectedrecord component
-
corsTainting
public boolean corsTainting()Returns the value of thecorsTaintingrecord component.- Returns:
- the value of the
corsTaintingrecord component
-
opaqueRedirect
public boolean opaqueRedirect()Returns the value of theopaqueRedirectrecord component.- Returns:
- the value of the
opaqueRedirectrecord component
-