Skip to content

How to obtain the value of --data #3013

Answered by robjtede
zhangwuqiao asked this question in Q&A
Discussion options

You must be logged in to vote

It looks like you're trying to send JSON, however that snippet isn't valid JSON.

Using the Json<T> extractor (docs) you would be able to obtain a struct with the sent data.

Alternatively, use String or Bytes as the extractor to get the raw string or byte payload respectively.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@robjtede
Comment options

Answer selected by robjtede
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