janhommes / o.js

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

Return response HTTP headers back to O object? #62

Closed be236 closed 6 years ago

be236 commented 6 years ago

When making O() call, can you return the response HTTP headers as well, so I can parse that?

This is feature request for o.js lib.

janhommes commented 6 years ago

We can use the XMLHttpRequest object and attach them to the callback result.

DerGuteWolf commented 6 years ago

I second this, please add the headers eg to oHandler. Use case for me is with SAP OData v4 implementation additional infos are returned in various headers.

thecouchcoder commented 6 years ago

Any update on this?

janhommes commented 6 years ago

Can you see that PR #73 if it fits your needs?

DerGuteWolf commented 6 years ago

From looking at the source code this looks good, however I am currently busy with other stuff, so it will take some time until I can test it.