angularjs - XMLHttpRequest POST response with "Location" header not accessible to javascript code in cross domain situation -


facts:

rest specification post states :

"post : create new entry in collection. new entry's uri assigned automatically , returned operation."

i have read somewhere uri sent in response header 'location'.

i using angularjs javascript client , jersey server responding rest requests.

when both client , server present in same package , deployed togheter, 'location' header present javascript client: working fine !

when client , server deployed in different sites 'location' header not present javascript client.

  • note1 : cross-origin resource sharing : cors used in order enable interaction: not clear me if in situation 'location' header should present javascript client.
  • note2: 'location' header being produced server , arrives client browser (it displayed in devtools of client browser).

my question: in javascript client in order know uri of created instance ?

  • must use other post (may put) ?
  • must fire second search request (after post) in order created uri.

note3 : have read question here , lot more before asking here.

thanks in advance, w

sending header "access-control-expose-headers" value "location" server enables javascript client receive "location" header in cors exchange.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -