How to pass in correlation id into IHttpProvider? - microsoft-graph-api

I need to pass correlation Id into the IHttpProvider to let them log it for debugging purpose. How should I do that? Thanks!

We don't have a great solution for you to provide your own correlation Id today, however it something that we are working on. Requests that are made to Graph will get assigned a request id and you should be able to see that in the response headers. You could add your own using header using .Request(options).

Related

How to count users using Microsoft graph?

According to the documentation https://learn.microsoft.com/en-us/graph/query-parameters?#count-parameter
I should be able to get the count by using
https://graph.microsoft.com/beta/users?count=true
but it doesn't work...
Also I found that if I add ConsistencyLevel: eventual to the request header I do get a count but
it's not in the documentation so I'm not sure the count is the real user count
Am I missing something?
GET https://graph.microsoft.com/beta/users?$search="displayName:wa"&$orderby=displayName&$count=true
ConsistencyLevel: eventual
Please refer to this document which tells we need to use ConsistencyLevel: eventual
See also this article on the $count parameter:
https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#count-parameter

Can I force OpenLayers 5 to send POST request?

Here is my issue.
I have to filter an ImageLayer with OpenLayers 5, so I prepared this kind of code :
const params = layerToFilter.getSource().getParams();
delete params.CQL_FILTER;
params.CQL_FILTER = myFilter;
layerToFilter.getSource().updateParams(params);
This code works fine, but not if "myFilter" variable is a too big string.
For example, with a filter like 'FEATUREID IN (1,2,3,4...1000)', I get a HTTP 414 URI too long.
My question is : is there a way to force OpenLayers 5 to use POST request instead of GET request when it tries to refresh map layers ?
I have some workaround ideas like building a smaller filter and prepare a view for this filter on database side, or by making preprocessing also on database side, but it will be really easier if I could simply send POST request.
Any help or suggestion will be appreciated :-)
Many thanks in advance.
Geoserver can publish feature id as a property of a layer. So you dont have to use FEATUREID. You can use CQL_FILTER instead of FEATUREID
http://locahost:8080/?CQL_FILTER=id BETWEEN 1 AND 1000

What exactly should I pass as ID of the desired status to statuses/retweet/:id

Question regarding Twitter API and this method https://dev.twitter.com/rest/reference/post/statuses/retweet/%3Aid.
Can someone please explain me what is id parameter means in https://api.twitter.com/1.1/statuses/retweet/:id.json method?
The numerical ID of the desired status.
is not clear for me.
Take a look at this URL
https://twitter.com/edent/status/671673463673876480
The ID is the long number at the end. You'll find it in the id_str of any status you access via the API.

how do you get multiple Twitter names using api querystring

HI,how do i get multiple twitter name using API querystring,exmaple i need to populate related with the name of 'john'.how can i do that here i have one example below 'http://search.twitter.com/search.atom?q=from%3Ajohn' by this example we can see only particular user name only but i want related name.Kindly let me know ASAP.
You can use the OR operator...
http://search.twitter.com/search.atom?q=from%3ADWRoelands+OR+from%3AJohn

how do i get multiple twitter name using API querystring?

HI,how do i get multiple twitter name using API querystring,exmaple i need to populate related with the name of 'john'.how can i do that here i have one example below
'http://search.twitter.com/search.atom?q=from%3Ajohn' by this example we can see only particular user name only but i want related name.Kindly let me know ASAP.
You can use the OR operator...
http://search.twitter.com/search.atom?q=from%3ADWRoelands+OR+from%3AJohn

Resources