Weird Behavior hitting

Hey all, back after dealing with a whole heap of life.

Working on tying some of my systems to OpenHab, and one of the simple things I wanted to do was to hit “http://localhost:8080/rest/items” and pull some information from there.

When I try it from postman, works fine. But when I try it from within my program, with no bells and whistles added, it returns a content length of -1 and a 200 response code.

When I try http://localhost:8080/rest, the response is the same on both machines, so I am wondering if I need to add something special.

Any ideas? Is there a way to turn the jetty debugging level up so I can see what the difference in payload is between postman and my application?

If you install the REST Documentation through PaperUI (Misc tab) you will get interactive documentation of all the REST calls that show you the curl command, options, and results.

In this case you might be missing the “Accept: application/json” header field.

Was one of the first things I tried, but good call.

http://localhost:8080/rest/items/Office_DeskBackLight_Switch seems to work fine, as does http://localhost:8080/rest, just the http://localhost:8080/rest/items that seems to have a problem.