# Path: commands/request.py
# class RequesterCommand(RequestsMixin, RequestCommandMixin, sublime_plugin.TextCommand):
#     """Execute requests from requester file concurrently and open multiple
#     response views.
#     """
#     def run(self, edit, concurrency=10):
#         """Allow user to specify concurrency.
#         """
#         self.MAX_WORKERS = max(1, concurrency)
#         super().run(edit)


import sublime
import sublime_plugin
import datetime
import argparse
import json
import shlex
import re
import sys
import traceback
from time import time
from collections import namedtuple
from urllib.parse import urlencode, parse_qsl
from ..deps.requests import Request
from .request import RequesterCommand
from ..core.responses import prepare_request
from ..core.helpers import is_instance
            if len(req.args) == 2:
                req.kwargs['data'] = req.args.pop()
        if req.method in ('POST'):
            if len(req.args) == 3:
                req.kwargs['json'] = req.args.pop()
            if len(req.args) == 2:
                req.kwargs['data'] = req.args.pop()
        req.args.insert(0, req.method)

        try:
            prepared_requests.append(PreparedRequest(
                RequestAcceptsAllArgs(*req.args, **req.kwargs), args, kwargs, req.session
            ))
        except Exception as e:
            errors.append(str(e))
            traceback.print_exc()

    exports = []
    for request in prepared_requests:
        try:
            exports.append(exporter(request))
        except Exception as e:
            errors.append(str(e))
            traceback.print_exc()

    if errors:
        sublime.error_message('\n\n'.join(errors))
    return exports



# Path: commands/request.py
# class RequesterCommand(RequestsMixin, RequestCommandMixin, sublime_plugin.TextCommand):
#     """Execute requests from requester file concurrently and open multiple
#     response views.
#     """
#     def run(self, edit, concurrency=10):
#         """Allow user to specify concurrency.
#         """
#         self.MAX_WORKERS = max(1, concurrency)
#         super().run(edit)


# Path: commands/import_export.py
import sublime
import sublime_plugin
import datetime
import argparse
import json
import shlex
import re
import sys
import traceback
from time import time
from collections import namedtuple
from urllib.parse import urlencode, parse_qsl
from ..deps.requests import Request
from .request import RequesterCommand
from ..core.responses import prepare_request
from ..core.helpers import is_instance

            if len(req.args) == 2:
                req.kwargs['data'] = req.args.pop()
        if req.method in ('POST'):
            if len(req.args) == 3:
                req.kwargs['json'] = req.args.pop()
            if len(req.args) == 2:
                req.kwargs['data'] = req.args.pop()
        req.args.insert(0, req.method)

        try:
            prepared_requests.append(PreparedRequest(
                RequestAcceptsAllArgs(*req.args, **req.kwargs), args, kwargs, req.session
            ))
        except Exception as e:
            errors.append(str(e))
            traceback.print_exc()

    exports = []
    for request in prepared_requests:
        try:
            exports.append(exporter(request))
        except Exception as e:
            errors.append(str(e))
            traceback.print_exc()

    if errors:
        sublime.error_message('\n\n'.join(errors))
    return exports



class RequesterExportToCurlCommand(RequesterCommand):