fortify / fcli

fcli is a command-line utility for interacting with various Fortify products
https://fortify.github.io/fcli/
Other
28 stars 16 forks source link

Verify consistent use of .as().getBody() #410

Open psmf22 opened 11 months ago

psmf22 commented 11 months ago

In some commands unirest command responses are cast as empty which might lead to loss of information in error cases.

An example I already fixed:

unirest.delete(SSCUrls.AUTH_ENTITIES).queryString("ids", authEntityIdsToDelete).asEmpty().getBody();

.asEmpty() should be replaced by either .asString() or .asObject(JsonNode.class). We might want to investigate which one looks better before we rework.