Skip to content

Latest commit

 

History

History
83 lines (58 loc) · 2.09 KB

File metadata and controls

83 lines (58 loc) · 2.09 KB

Back to overview

Head

The Head class provides a convenient way to perform HTTP HEAD requests. It allows customization of headers, offering flexibility in testing scenarios where only the headers and not the response body are of interest. This class extends the abstract ARequest class.

Table of Contents

Class Overview

Extends

This class extends the ARequest abstract class, providing a specific implementation for sending HTTP HEAD requests.

Methods

performAs

public async performAs(actor: Actor): Promise<Response>;
  • Description: Send an HTTP HEAD request to the specified URL.
  • Parameters:
    • actor - The actor performing the action.
  • Returns: Promise<Response> - The response object.

from

public static from(url: string): Head;
  • Description: Create a new instance of the Head class with the specified URL.
  • Parameters:
    • url - The URL of the target.
  • Returns: Head - A new instance of the Head class.

withHeaders

public withHeaders(headers: Headers): Head;
  • Description: Add headers to the HTTP HEAD request.
  • Parameters:
    • headers - The headers to be added.
  • Returns: Head - The updated instance of the Head class.

withAbilityAlias

public withAbilityAlias(alias: string): Head;
  • Description: Defines the ability alias to be used during execution.
  • Parameters:
    • alias - The alias.
  • Returns: Head - Returns the current action.

orSkipOnFail

Introduced in: 1.6.0

public get orSkipOnFail(): Head;
  • Description: Allows to skip an action on fail.
  • Returns: Head - Returns the current action.

Back to overview