DCS World Typescript
    Preparing search index...
    • Parses an HTTP request string and constructs an HttpRequest object.

      This function takes a raw HTTP request payload as a string and parses it to construct an HttpRequest object. It splits the request into its constituent parts: start line, headers, and potentially a body.

      Parameters

      • requestPayload: string

        The complete HTTP request payload as a string.

      Returns HttpRequest

      The HttpRequest object representing the parsed request.

      The function assumes that the request payload follows the standard HTTP request format, with a start line, followed by headers, an empty line, and an optional body.