import requests
from logging_config import get_logger

logger = get_logger(__name__)

class FetchQueueClient:
    def __init__(self, config):
        self.url = config.FETCH_QUEUE_URL

    def fetch(self, payload):
        response = requests.post(
            self.url,
            json=payload,
            verify=False,            
            timeout=20
        )
        response.raise_for_status()
        return response.json()
