darnjo / web-api-commander

Web API client which uses the Apache Olingo library to work with OData
2 stars 0 forks source link

--getEntities data write fails when $count parameter is omitted from --uri #8

Open dgmyrek opened 5 years ago

dgmyrek commented 5 years ago

Here's a request including the $count parameter that succeeds and writes records (no pagination) to the specified output file:

java -Dlog4j.configuration=file:/home/dylan/Git/web-api-commander/out/log4j.xml -jar web-api-commander.jar --getEntities --uri 'https://sparkapi.com/Reso/OData/Property?$count=true' --bearerToken [redacted] --outputFile outputfile2

The exact same request minus the $count parameter results in nothing being written to my output file. The API responds with data, but for whatever reason the tool never stores it:

java -Dlog4j.configuration=file:/home/dylan/Git/web-api-commander/out/log4j.xml -jar web-api-commander.jar --getEntities --uri 'https://sparkapi.com/Reso/OData/Property' --bearerToken [redacted] --outputFile outputfile2

Here's a sample of the end of the log file.

[DEBUG] [16:55:34.789] Connection 0.0.0.0:39783<->76.10.121.154:443 closed [DEBUG] [16:55:34.789] 10 [DEBUG] [16:55:34.790] URI created: https://sparkapi.com/Reso/OData/Property?%24skip=10

darnjo commented 5 years ago

Interesting. I'll take a look.