while yes, I shouldn't be using the -f switch in the manner I did, I did say I put it in as a quick fix/test to force read the entire buffer. After the headers, in the response, there is a line break. The reader assumes that is the end of the response, and stops reading. That was the initial problem, why I wasn't getting the body of the response, and using the -f switch as a quick test worked in that manner.


As for the JSON part, Froggie was correct, as I also mentioned in my previous post edit. The JSON wasn't returning any information due to an unclosed handler with the same name.

Both JSON and using sockets works correctly now.