CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.8.12 (changelog, source)
Search

Member predicate ClientRequest::getAResponseDataNode

Gets a data flow node that refers to some representation of the response, possibly wrapped in a promise object.

The responseType describes how the response is represented as a JavaScript value (after resolving promises), and may assume the following values:

  • Any response type defined by XMLHttpRequest:
    • text: The result is a string
    • json: The result is a deserialized JSON object
    • arraybuffer: The result is an ArrayBuffer object
    • blob: The result is a Blob object
    • document: The result is a deserialized HTML or XML document
  • Any of the following additional response types defined by this library:
    • fetch.response: The result is a Response object from fetch.
    • stream: The result is a Node.js stream and http.IncomingMessage object
    • header: The result is the value of a header, as a string
    • headers: The result is a mapping from header names to their values.
    • error: The result is an error in an unspecified format, possibly containing information from the response
    • An empty string, indicating an unknown response type.
  • Any value provided by custom implementations of ClientRequest::Range.
Node getAResponseDataNode(string responseType, boolean promise)