janhommes / o.js

o.js - client side oData lib.
https://janhommes.github.io/o.js/example/
MIT License
241 stars 58 forks source link

can't get @odata.count data from response #133

Closed BobbleHatkjh closed 1 year ago

BobbleHatkjh commented 2 years ago

ihave wrote a GET request example such like demo in readme but i can't get the total count number which already shown in chome's NETWORK tab, i only could get the value data. how could i do to resolve this problem

Screen Shot 2022-04-14 at 5 16 32 PM Screen Shot 2022-04-14 at 5 17 53 PM Screen Shot 2022-04-14 at 5 18 15 PM
janhommes commented 2 years ago

Sorry for the late response.

See: https://github.com/janhommes/o.js#just-fetching query() tries to be smart by parsing the result leading to that you only get the data. You can use fetch() instead to get all.