WebResponseValidatorValidateResponse Method (WebResponse, WebResponseType, String) |
Validates a
WebResponse to be of a given range of types.
Namespace:
NScrape
Assembly:
NScrape (in NScrape.dll) Version: 0.4.1.0
Syntax public static WebResponse ValidateResponse(
WebResponse response,
WebResponseType[] validTypes,
string message
)
Public Shared Function ValidateResponse (
response As WebResponse,
validTypes As WebResponseType(),
message As String
) As WebResponse
public:
static WebResponse^ ValidateResponse(
WebResponse^ response,
array<WebResponseType>^ validTypes,
String^ message
)
static member ValidateResponse :
response : WebResponse *
validTypes : WebResponseType[] *
message : string -> WebResponse
Parameters
- response
- Type: NScrapeWebResponse
The web response to be validated. - validTypes
- Type: NScrapeWebResponseType
The range of valid web response types. - message
- Type: SystemString
The error message to be used to generate an exception if the validation fails.
Return Value
Type:
WebResponseThe web response.
Exceptions Exception | Condition |
---|
Exception | The web response is not valid. |
See Also