Skip to content

Commit

Permalink
URL encode omni api path portions (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericanderson authored May 17, 2024
1 parent 403915b commit 94833a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/four-ways-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@osdk/shared.net": patch
---

URL encode path portions for foundry platform sdk
2 changes: 1 addition & 1 deletion packages/shared.net/src/foundryPlatformFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export async function foundryPlatformFetch<
): Promise<Awaited<ReturnType<NonNullable<X["__funcBrand"]>>>> {
const path = origPath.replace(
/\{([^}]+)\}/g,
() => (args as any[]).shift(),
() => encodeURIComponent((args as any[]).shift()),
);

const body = (flags! & 1) ? args.shift() : undefined;
Expand Down

0 comments on commit 94833a7

Please sign in to comment.