Skip to content

Commit

Permalink
Fix indentation in the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 20, 2020
1 parent 3dd2273 commit 6aa86f2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,16 @@ const got = require('got');
const pipeline = promisify(stream.pipeline);

(async () => {
await pipeline(
got.stream('https://sindresorhus.com'),
fs.createWriteStream('index.html')
);

// For POST, PUT, PATCH, and DELETE methods, `got.stream` returns a `stream.Writable`.
await pipeline(
fs.createReadStream('index.html'),
got.stream.post('https://sindresorhus.com')
);
await pipeline(
got.stream('https://sindresorhus.com'),
fs.createWriteStream('index.html')
);

// For POST, PUT, PATCH, and DELETE methods, `got.stream` returns a `stream.Writable`.
await pipeline(
fs.createReadStream('index.html'),
got.stream.post('https://sindresorhus.com')
);
})();
```

Expand Down Expand Up @@ -882,12 +882,12 @@ got('https://api.github.com/some-endpoint', {
beforeError: [
error => {
const {response} = error;
if (response && response.body) {
if (response && response.body) {
error.name = 'GitHubError';
error.message = `${response.body.message} (${response.statusCode})`;
}

return error;
return error;
}
]
}
Expand Down

0 comments on commit 6aa86f2

Please sign in to comment.