HackerRank Native HTTP Request

I don’t know about your error, but the correct answer would be something like:

Application.ensure_all_started(:inets)
Application.ensure_all_started(:ssl)
:httpc.request(:get, {'https://jsonmock.hackerrank.com/api/articles?author=epaga&page=1', []}, [
  ssl: [
    verify: :verify_peer,
    cacertfile: '/etc/ssl/cert.pem',
    depth: 3,
    customize_hostname_check: [
      match_fun: :public_key.pkix_verify_hostname_match_fun(:https)
    ]
  ]
], [])