class_docstr: Add a structure to the ctx object that can be parsed by InjectRequestsParse().
class_docstr_tok: ["Add","a","structure","to","the","ctx","object","that","can","be","parsed","by","InjectRequestsParse","(",")","."]
code: def add(
      self, match, response=None, http_status=None, requests_error=None
  ):
      ctx_inject = self._ctx.setdefault("inject", {})
      ctx_rules = ctx_inject.setdefault("rules", [])
      rule = {}
      rule["match"] = match._as_dict()
      if response:
          rule["response"] = response
      if http_status:
          rule["http_status"] = http_status
      if requests_error:
          rule["requests_error"] = requests_error
      ctx_rules.append(rule)
  
imports: import json
  import threading
  import urllib
  from unittest.mock import MagicMock
  import requests
label_desc: Use image node_id 2 for calling the InjectRequests obj's underlying member method code with example usage: obj.add(match, response, http_status, requests_error) without return types