Class ExtractDependencies

java.lang.Object
Services.Dependencies.ExtractDependencies

public class ExtractDependencies extends Object
Extracts and analyzes dependencies from a HAR (HTTP Archive) file.

This class handles:

  • Reading HAR files
  • Parsing responses
  • Analyzing headers, query parameters, cookies, and body data
  • Building a dependency graph of HTTP requests
  • Constructor Details

    • ExtractDependencies

      public ExtractDependencies(File har_file) throws IOException
      Constructs an ExtractDependencies object from a HAR file.
      Parameters:
      har_file - HAR file to read
      Throws:
      IOException - if the file cannot be read
  • Method Details

    • getHar

      public Har getHar()
      Returns the parsed HAR object.
      Returns:
      HAR object
    • getFile_har

      public File getFile_har()
      Returns the HAR file.
      Returns:
      HAR file
    • getResponseUnstructuredList

      public List<ResponseUnstructured> getResponseUnstructuredList()
      Returns the list of unstructured response objects parsed from the HAR.
      Returns:
      list of ResponseUnstructured
    • analyze_responses

      public void analyze_responses()
      Analyzes all responses in the HAR file.

      For JSON responses, it extracts the unstructured representation. It also analyzes response headers for all entries.

    • build_dependencies_graph

      public DependencyGraph build_dependencies_graph() throws IOException
      Builds a dependency graph of all requests in the HAR file.

      This method checks dependencies between requests based on:

      • URL segments
      • Headers
      • Query parameters
      • Request body
      • Cookies
      Returns:
      DependencyGraph representing all dependencies between requests
      Throws:
      IOException - if there is an error processing request data
    • main

      public static void main(String[] args) throws IOException
      Throws:
      IOException