What is the format of Document for Affjax.Node.get?

Hi, I’m trying to

  resp <- liftAff $ AN.get AXRF.document "http://0.0.0.0:8001/" 
  log $ either printError (\x -> x.statusText) resp

I get

[info] Build succeeded.
There was a problem with the response body: Type mismatch: expected Document, found String

With curl, I get

$ curl http://0.0.0.0:8001
<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Shows current MSK time">
    <meta name="keywords" content="MSK,time">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Time page</title>
  </head>
  <body>
    <div>
      <script src="/index.f708bf3c.js" defer=""></script>
    </div>
  </body>
</html>

Welcome br4ch1st0chr0n3!

Are you able to check the headers on the response (with cURL I think you just need -i)? My best guess is that by setting the response type to “Document” it’s expecting one of a set of Content-Type values like “text/html” and my guess based on the error message is that you’re getting a Content-Type like “text/plain”.

Thank you, @ntwilson! I left the missing info in an issue