Skip to content

Commit 20fa494

Browse files
Revert "Update README.md with download as binary example"
This reverts commit ac47d5b.
1 parent ebe237a commit 20fa494

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -241,19 +241,7 @@ You can pass in additional request headers, either individually or in a dictiona
241241
````
242242

243243
### .responseType()
244-
To set a custom response type, use the `.responseType(string)` method. Use `.responseType("blob")` to download content as a binary.
245-
````js
246-
client
247-
.api(`/me/drive/root/children/${fileName}/content`)
248-
.responseType("blob")
249-
.get()
250-
.then((res) => {
251-
console.log("Downloaded..!!");
252-
})
253-
.catch((err) => {
254-
throw err;
255-
});
256-
````
244+
To set a custom response type, use the `.responseType(string)` method. To see an example, check the [browser sample](samples/browser/index.html) that downloads an image and displays it in an `<img>` element.
257245

258246
## Running node samples
259247
You can run and debug the node samples found under [./samples/node/node-sample.js](./samples/node/node-sample.js) by running the *Run node samples* configuration from the **Debug** (Ctrl + Shift + D) menu in Visual Studio Code. Alternately, you can run the node samples from the CLI by entering `node ./samples/node/node-sample.js` (assuming you are at the root of this repo). You'll need to rename the *secrets.example.json* file to *secrets.json* and add a valid access token to it. You can get an access token by doing the following:

0 commit comments

Comments
 (0)