1

We are calling the Odata endpoint from our application. The odata endpoint has few headers needed like below

enter image description here

I am able to add the content on to my application which calls the end point like below

               ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });
                Uri uri = new Uri(BaseURL_Core);
                client_Core.BaseAddress = uri;
                client_Core.DefaultRequestHeaders.Accept.Clear();
                client_Core.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                client_Core.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray_Core));

How to set here the Prefer that will set the maxpagesize

1 Answer 1

1

Just use method Add on DefaultRequestHeades collection to add custom ones.

client_Core.DefaultRequestHeades.Add("Prefer", "odata.maxpagesize=500")
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.