Class BodyDependency

java.lang.Object
Services.Dependencies.BodyDependency

public class BodyDependency extends Object
Handles analysis of request bodies (POST/PUT) to detect dependencies between requests.

This class inspects the request payloads in different formats:

  • application/x-www-form-urlencoded
  • application/json (objects and arrays)
It updates the DependencyGraph based on detected dependencies between requests.
  • Constructor Details

    • BodyDependency

      public BodyDependency()
  • Method Details

    • check_body_dependency

      public static void check_body_dependency(List<ResponseUnstructured> responseUnstructuredList, int req_index, DependencyGraph dependencyGraph, MyNode to, int first_index_response) throws IOException
      Checks for dependencies in the body of a POST or PUT request.

      If the request body is form-urlencoded, it delegates to check_body_urleconded_dep(List, int, DependencyGraph, MyNode, int). If the body is JSON, it parses it and delegates to check_application_json_dep(List, Object, String, int, DependencyGraph, MyNode, int).

      Parameters:
      responseUnstructuredList - list of previously analyzed unstructured responses
      req_index - index of the current request in the HAR sequence
      dependencyGraph - the graph to update with detected dependencies
      to - the target node representing the current request
      first_index_response - index of the first response to consider for dependency checks
      Throws:
      IOException - if reading or parsing the request body fails