byte[] byteData = Encoding.UTF8.GetBytes("{ "name": "searitem" }");
This isn't working because you did not properly handle the quotes inside the string; the quote at
"name
is actually causing the string to close.
If you want to put quotes in strings, you have to
escape them, by typing
\"
:
byte[] byteData = Encoding.UTF8.GetBytes("{ \"name\": \"searitem\" }");