REST connect command using ajax

Hi there,
I’m fairly new to OrientDB, so I might be missing something obvious here, feel free to let me know.
I’m trying to utilise the REST api and getting data straight to the browser from the db. I played with the API from postman, and it seems to work really well, however when it gets to javascript/jquery, the OSESSIONID token returned by the connect command seems to be impossible to get out from the xhr. I’m wondering why can’t it just return it “normally” in the response-body, like any other api would?
Again, I might be missing something here…