Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
format token
Browse files
components/editor/main/snippet/index.tsx
CHANGED
@@ -26,21 +26,39 @@ export const Snippet = ({
|
|
26 |
<div className="mt-8 grid grid-cols-1 gap-4 w-full">
|
27 |
<CurlSnippet
|
28 |
endpoint={endpoint}
|
29 |
-
headers={
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
body={body}
|
31 |
parameters={parameters}
|
32 |
onCopyToClipboard={handleCopyToClipboard}
|
33 |
/>
|
34 |
<JavascriptSnippet
|
35 |
endpoint={endpoint}
|
36 |
-
headers={
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
body={body}
|
38 |
parameters={parameters}
|
39 |
onCopyToClipboard={handleCopyToClipboard}
|
40 |
/>
|
41 |
<PythonSnippet
|
42 |
endpoint={endpoint}
|
43 |
-
headers={
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
body={body}
|
45 |
parameters={parameters}
|
46 |
onCopyToClipboard={handleCopyToClipboard}
|
|
|
26 |
<div className="mt-8 grid grid-cols-1 gap-4 w-full">
|
27 |
<CurlSnippet
|
28 |
endpoint={endpoint}
|
29 |
+
headers={
|
30 |
+
headers?.Authorization
|
31 |
+
? {
|
32 |
+
Authorization: `Bearer ${headers.Authorization}`,
|
33 |
+
}
|
34 |
+
: {}
|
35 |
+
}
|
36 |
body={body}
|
37 |
parameters={parameters}
|
38 |
onCopyToClipboard={handleCopyToClipboard}
|
39 |
/>
|
40 |
<JavascriptSnippet
|
41 |
endpoint={endpoint}
|
42 |
+
headers={
|
43 |
+
headers?.Authorization
|
44 |
+
? {
|
45 |
+
Authorization: `Bearer ${headers.Authorization}`,
|
46 |
+
}
|
47 |
+
: {}
|
48 |
+
}
|
49 |
body={body}
|
50 |
parameters={parameters}
|
51 |
onCopyToClipboard={handleCopyToClipboard}
|
52 |
/>
|
53 |
<PythonSnippet
|
54 |
endpoint={endpoint}
|
55 |
+
headers={
|
56 |
+
headers?.Authorization
|
57 |
+
? {
|
58 |
+
Authorization: `Bearer ${headers.Authorization}`,
|
59 |
+
}
|
60 |
+
: {}
|
61 |
+
}
|
62 |
body={body}
|
63 |
parameters={parameters}
|
64 |
onCopyToClipboard={handleCopyToClipboard}
|