getIssue :: Wreq.Options -> URI -> Text -> IO Issue
getIssue options host key = do
  debug $ printf "Fetching issue %s..." key
  response <- Wreq.getWith options url >>= asJSON
  return $ response ^. responseBody
  where
    url = uriToString id absoluteUrl ""
    absoluteUrl = host
      { uriPath = printf "/rest/api/2/issue/%s" key
      }
getIssue :: Wreq.Options -> URI -> Text -> IO Issue
getIssue options host key = do
  debug $ printf "Fetching issue %s..." key
  response <- Wreq.getWith options url >>= asJSON
  return $ response ^. responseBody
  where
    url = uriToString id absoluteUrl ""
    absoluteUrl = host
      { uriPath = printf "/rest/api/2/issue/%s" key
      }
getIssue options host key = do
  debug $ printf "Fetching issue %s..." key
  response <- Wreq.getWith options url >>= asJSON
  return $ response ^. responseBody
  where
    url = uriToString id absoluteUrl ""
    absoluteUrl = host
      { uriPath = printf "/rest/api/2/issue/%s" key
      }