does json option support all json values?
#2008
Closed
samzilverberg
started this conversation in
General
Replies: 1 comment
-
|
this was probably fixed at some point, the you can send primitives like this: await got.post('https://example.com', {
json: true
});
await got.post('https://example.com', {
json: 'hello'
});
await got.post('https://example.com', {
json: [1, 2, 3]
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was trying to use GOT (latest) to write some "niche" tests that send some json that probably only people trying to break your server would use.
values such as:
true,false,null,"123",1,[1,2,3].But noticed that GOT only supports
Record<string, any>.got/source/core/options.ts
Lines 1356 to 1365 in d95ceea
Shouldn't it support all valid json values?
Is there a way to use GOT to send these "niche" json values?
side note: I'm not sure how the array is supported, I can only imagine that there is some conversion between Record and array...
Beta Was this translation helpful? Give feedback.
All reactions