spring-attic / rest-shell

Command-line shell for interacting with Spring HATEOAS-compliant REST resources
Apache License 2.0
456 stars 100 forks source link

`put` command doesn't seem to work and logs don't seem to have much information #16

Open nebhale opened 11 years ago

nebhale commented 11 years ago

Currently, when running put --data "{}", the shell returns Command failed java.lang.NullPointerException. Looking into .rest-shell.log, nothing is listed. Looking into spring-shell.log the only thing that shows up is // [failed] put --data "{}".

Sorry I can't be more help, but let me know if you'd like me to do any additional troubleshooting for you.

jbrisbin commented 11 years ago

Thanks for pointing out this bug. I found another one when digging into this. :) There was no default specified on put when not passing a path parameter, so it was blowing up on that. I also found that if a server says it's returning JSON but doesn't include anything in the body, the parsing code was blowing up.

In addition to the fix for #15, I'll push a fix for this in a few minutes.