From 185c0e3d0da30c2e750b2884a950d16ebdbf1802 Mon Sep 17 00:00:00 2001 From: Christian Paul Date: Tue, 18 Jan 2022 18:49:44 +0100 Subject: [PATCH] Update Docs: req.header() is now req.set() (#1617) --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index ade9ee36f..51a6e3f22 100644 --- a/docs/index.md +++ b/docs/index.md @@ -291,7 +291,7 @@ In a similar fashion to the `.type()` method it is also possible to set the `Acc ### Facebook and Accept JSON -If you are calling Facebook's API, be sure to send an `Accept: application/json` header in your request. If you don't do this, Facebook will respond with `Content-Type: text/javascript; charset=UTF-8`, which SuperAgent will not parse and thus `res.body` will be undefined. You can do this with either `req.accept('json')` or `req.header('Accept', 'application/json')`. See [issue 1078](https://github.com/visionmedia/superagent/issues/1078) for details. +If you are calling Facebook's API, be sure to send an `Accept: application/json` header in your request. If you don't do this, Facebook will respond with `Content-Type: text/javascript; charset=UTF-8`, which SuperAgent will not parse and thus `res.body` will be undefined. You can do this with either `req.accept('json')` or `req.set('Accept', 'application/json')`. See [issue 1078](https://github.com/visionmedia/superagent/issues/1078) for details. ## Query strings