Skip to content

What is the recommended way of doing "--data-raw" with reastease? #204

Answered by canton7
mifriis asked this question in Q&A
Discussion options

You must be logged in to vote

See here.

If you pass a string, that value is used directly as the body. If you pass a different value (which isn't one of the other special ones in that list), it will be serialized as JSON using Json.NET.

Json.NET serializes the object 3 as the string 3, so what you've posted should do what you expect. However in general if you want to control exactly what goes in the body, make it a string.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mifriis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants