Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODataLib doesn't write relative URIs in OData batch operations #271

Closed
object opened this issue Jul 17, 2015 · 1 comment
Closed

ODataLib doesn't write relative URIs in OData batch operations #271

object opened this issue Jul 17, 2015 · 1 comment
Assignees
Milestone

Comments

@object
Copy link

object commented Jul 17, 2015

I received a change request regarding my library that generates OData requests using ODataLib. The library supports OData batch operations, and each operation is written using absolute URI - this is what ODataLib does.

Scenario when this doesn't work is a bit tricky and described here (simple-odata-client/Simple.OData.Client#122). There is a security layer and/or a load balancer in front of the processing server and the base URI for the OData request will no longer match the URI for each batch request in the body.

The developers tried to rewrite the generated batch payload, and as soon as they changed each operation's URI into a relative one, the batch request worked.

I tried to tweak ODataLib but didn't get the same result: it always writes the absolute URI for batch operations.

@congysu
Copy link
Contributor

congysu commented Aug 7, 2015

See if can use client hooks to change the request uri: http://odata.github.io/odata.net/#04-06-use-client-hooks-in-odata-client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants