from typing import Optional
import requests


def get_request(url: str, headers: Optional[dict] = None, params: Optional[dict] = None):
    """Return response if request is successful and in JSON format"""
    try:
        response = requests.get(url, headers=headers, params=params).json()
    except:
        return
    else:
        return response