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

Add option to use relative uris for requests with associations #890

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

m2307
Copy link

@m2307 m2307 commented Jan 13, 2023

Adds a new option UseAbsoluteAssociationsUri in the settings, when disabled, relative urls are used in the associations (e.g. @odata.bind)

Request will go from:"

{
"@odata.type": "#ODataDemo.Product",
"ID": 1007,
"Name": "Test6",
"Description": "Test1",
"Price": 18.0,
"Rating": 1,
"ReleaseDate": "2023-01-13T13:46:45.6218006+01:00",
"Categories@odata.bind": ["https://services.odata.org/V4/OData/(S(iemb1b0csyws2o44cd4mmntn))/OData.svc/Categories(1005)"]
}

to

{
"@odata.context": "https://services.odata.org/V4/OData/(S(j3mvzffkbihcxf4lcocivxhk))/OData.svc/$metadata#ODataDemo.Product",
"@odata.type": "#ODataDemo.Product",
"ID": 1007,
"Name": "Test6",
"Description": "Test1",
"Price": 18.0,
"Rating": 1,
"ReleaseDate": "2023-01-13T13:46:42.76828+01:00",
"Categories@odata.bind": ["Categories(1005)"]
}

@m2307 m2307 changed the title Add option to use relative uris for requests for associations Add option to use relative uris for requests with associations Jan 13, 2023
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

Successfully merging this pull request may close these issues.

None yet

1 participant