input: from typing import Optional
  import requests
  
  def read_url(url: str) -> Optional[str]:
      """Read the contents from a given URL and return the text if the request is successful (HTTP status code 200).
      Otherwise, return None.
      
      >>> read_url('https://www.example.com')  # Assumes the URL returns a 200 status code
      'Example Domain\\nThis domain is for use in illustrative examples in documents. You may use this\\n    domain in literature without prior coordination or asking for permission.\\nMore information...'
      >>> read_url('https://www.non-existent-url.com')  # Assumes the URL returns a non-200 status code
      None
      """
output:     try:
          response = requests.get(url)
          if response.status_code == 200:
              return response.text
          else:
              return None
      except requests.RequestException:
          return None