forked from albertodeago/curl-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.test.ts.snap
More file actions
121 lines (102 loc) · 2.8 KB
/
main.test.ts.snap
File metadata and controls
121 lines (102 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`del1 1`] = `
"curl https://jsonplaceholder.typicode.com/posts/1 \\
-X DELETE"
`;
exports[`fileBody 1`] = `
"curl https://jsonplaceholder.typicode.com/posts \\
-X POST \\
-H 'Content-Type: application/json' \\
--data-binary @data.json"
`;
exports[`formBody1 1`] = `
"curl https://jsonplaceholder.typicode.com/posts \\
-X POST \\
-H 'Content-Type: application/x-www-form-urlencoded' \\
-F name=foo"
`;
exports[`formBody2 1`] = `
"curl https://jsonplaceholder.typicode.com/posts \\
-X POST \\
-H 'Content-Type: multipart/form-data' \\
-F file1=@data.json"
`;
exports[`formBody3 1`] = `
"curl https://jsonplaceholder.typicode.com/posts \\
-X POST \\
-H 'Content-Type: application/x-www-form-urlencoded' \\
-F file1=string data"
`;
exports[`formBody4 1`] = `
"curl https://jsonplaceholder.typicode.com/posts \\
-X POST \\
-H 'Content-Type: application/x-www-form-urlencoded' \\
-d 'key1=value+1'"
`;
exports[`get1 1`] = `"curl https://jsonplaceholder.typicode.com/posts/101 \\"`;
exports[`get2 1`] = `
"curl https://jsonplaceholder.typicode.com/todos/1 \\
-X GET"
`;
exports[`getEscapeHeaders 1`] = `
"curl https://jsonplaceholder.typicode.com/todos/1 \\
-X GET \\
-H 'key: a "strange" value'"
`;
exports[`getWithHeaders 1`] = `
"curl https://jsonplaceholder.typicode.com/todos/1 \\
-X GET \\
-H 'Content-Type: application/json'"
`;
exports[`jsonBody 1`] = `
"curl https://jsonplaceholder.typicode.com/posts \\
-X POST \\
-H 'Content-Type: application/json' \\
-d '{"name":"foo"}'"
`;
exports[`opt1 1`] = `
"curl https://jsonplaceholder.typicode.com/posts/1 \\
\\
--silent --show-error"
`;
exports[`opt2 1`] = `
"curl https://jsonplaceholder.typicode.com/posts/1 \\
\\
--output test.txt --silent"
`;
exports[`patch1 1`] = `
"curl https://jsonplaceholder.typicode.com/posts/1 \\
-X PATCH \\
-H 'Content-type: application/json; charset=UTF-8' \\
-d '{"title":"foo patched"}'"
`;
exports[`post1 1`] = `
"curl https://jsonplaceholder.typicode.com/posts \\
-X POST \\
-H 'Content-type: application/json; charset=UTF-8' \\
-d '{"id":"123-456-789","key1":"value 1","key2":"a \\\\"complex\\\\" value"}'"
`;
exports[`put1 1`] = `
"curl https://jsonplaceholder.typicode.com/posts/1 \\
-X PUT \\
-H 'Content-type: application/json; charset=UTF-8' \\
-d '{"id":1,"title":"foo","body":"barzzz","userId":1}'"
`;
exports[`rawBody1 1`] = `
"curl https://jsonplaceholder.typicode.com/posts \\
-X POST \\
-H 'Content-Type: text/plain' \\
-d 'string data'"
`;
exports[`rawBody2 1`] = `
"curl https://jsonplaceholder.typicode.com/posts \\
-X POST \\
-H 'Content-Type: text/plain' \\
-d 'string data'"
`;
exports[`searchParamsBody 1`] = `
"curl https://jsonplaceholder.typicode.com/posts \\
-X POST \\
-H 'Content-Type: text/plain' \\
-d 'key1=value+1'"
`;