Skip to content
#

superagent

Here are 91 public repositories matching this topic...

alexanderkjeldaas
alexanderkjeldaas commented Jan 27, 2020

I have a feeling that most people use async/await in new code, and none of the examples use it.

Also, from browsing random issues, better tests will be written using this structure. For example #543 is caused by not using async/await in tests.

// This passes!
it("should reset", async () => {
        request(app)
            .get("/reset")
            .expect(205);
});
cheton
cheton commented Sep 23, 2016

I suggest that the second parameter type should also accept a function as custom normalizer.

For example:

var request = require('superagent');
var serializer = require('superagent-serializer');

var customNormalizer = function(serializedRes) {
    // custom processing
    return serializedRes;
};

serializer(request, customNormalizer);

Improve this page

Add a description, image, and links to the superagent topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the superagent topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.