code: def _create_and_send_json_bulk(self, payload, req_url, request_type="POST"):
      
      # Extra header in addition to the main session's
      ct_header = {"Content-Type": "application/json; charset=utf-8"}
  
      try:
        json_pl = json.dumps(payload)
      except TypeError as err:
        raise CraftAiBadRequestError("Error while dumping the payload into json"
                                     "format when converting it for the bulk request. {}"
                                     .format(err.__str__()))
  
      if request_type == "POST":
        resp = self._requests_session.post(req_url, headers=ct_header, data=json_pl)
      elif request_type == "DELETE":
        resp = self._requests_session.delete(req_url, headers=ct_header, data=json_pl)
      else:
        raise CraftAiBadRequestError("Request for the bulk API should be either a POST or DELETE"
                                     "request")
  
      agents = self._decode_response(resp)
      agents = self._decode_response_bulk(agents)
  
      return agents
docs: Create a json, do a request to the URL and process the response.
  
      :param list payload: contains the informations necessary for the action.
      It's a list of dictionnary.
      :param str req_url: URL to request with the payload.
      :param str request_type: type of request, either "POST" or "DELETE".
      :default request_type: "POST".
  
      :return: response of the request.
      :rtype: list of dict.
  
      :raises CraftAiBadRequestError: if the payload doesn't have the
      correct form to be transformed into a json or request_type is
      neither "POST" or "DELETE".