Skip to content

Commit 2e67811

Browse files
committed
Update httpsnippet to bring in lots of new bits
This adds support for Rust, Ruby's Faraday, Crystal, and includes a whole bunch of small fixes & changes as well, effectively bringing us up to date with the upstream Kong repo.
1 parent 78924b0 commit 2e67811

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@fortawesome/free-solid-svg-icons": "^5.12.1",
4747
"@fortawesome/react-fontawesome": "^0.1.8",
4848
"@httptoolkit/accounts": "^2.3.0",
49-
"@httptoolkit/httpsnippet": "^2.2.0",
49+
"@httptoolkit/httpsnippet": "^3.0.0",
5050
"@open-rpc/meta-schema": "^1.14.2",
5151
"@phosphor-icons/react": "^2.1.5",
5252
"@reach/router": "^1.2.1",

src/model/ui/export.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ export function generateCodeSnippet(
5151
const harSnippetBase = simplifyHarForSnippetExport(harRequest);
5252

5353
// Then, we convert that HAR to code for the given target:
54-
return new HTTPSnippet(harSnippetBase).convert(snippetFormat.target, snippetFormat.client);
54+
return new HTTPSnippet(harSnippetBase)
55+
.convert(snippetFormat.target, snippetFormat.client)
56+
.trim();
5557
};
5658

5759
const simplifyHarForSnippetExport = (harRequest: ExtendedHarRequest) => {

0 commit comments

Comments
 (0)