ladjs / superagent

Ajax for Node.js and browsers (JS HTTP client). Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
https://ladjs.github.io/superagent/
MIT License
16.58k stars 1.33k forks source link

Documentation is broken #1587

Closed adam-arold closed 4 years ago

adam-arold commented 4 years ago

I'm looking at this page and I can't find what to import in order to get the request object that is often used in the code examples.

I figured that I can do this: import { superagent as request } from "superagent"; but the agent() method is missing. In its current from one can't determine from the documentation how to use the agent() in order to enable cookies.

niftylettuce commented 4 years ago

You figure it out I take it?

adam-arold commented 4 years ago

It would be great if the docs would include the imports, but I figured out that I was importing the wrong object.

niftylettuce commented 4 years ago

PR welcome

adam-arold commented 4 years ago

I don't really have the time now, sadly.

niftylettuce commented 4 years ago

okay.