Class GraphHttpClient
Inheritance
Namespace: PnP.Framework.Graph
Assembly: PnP.Framework.dll
Syntax
public static class GraphHttpClient : object
Fields
GraphBaseUrl
Declaration
public const string GraphBaseUrl = null
Field Value
System.
|
MicrosoftGraphBetaBaseUri
Declaration
public const string MicrosoftGraphBetaBaseUri = null
Field Value
System.
|
MicrosoftGraphV1BaseUri
Declaration
public const string MicrosoftGraphV1BaseUri = null
Field Value
System.
|
Methods
GetGraphEndPointUrl(AzureEnvironment, Boolean)
Returns the graph endpoint URL based upon the Azure Environment
Declaration
public static string GetGraphEndPointUrl(AzureEnvironment azureEnvironment = default(AzureEnvironment), bool beta = false)
Parameters
Azure
|
System.
|
Returns
System.
|
MakeDeleteRequest(String, String)
This helper method makes an HTTP DELETE request
Declaration
public static void MakeDeleteRequest(string requestUrl, string accessToken = null)
Parameters
System. The URL of the request |
System. The AccessToken to use for the request |
MakeGetRequestForStream(String, String, String)
This helper method makes an HTTP GET request and returns the result as a String
Declaration
public static IO.Stream MakeGetRequestForStream(string requestUrl, string accept, string accessToken = null)
Parameters
System. The URL of the request |
System. The accept header for the response |
System. The AccessToken to use for the request |
Returns
System. The Stream of the result |
MakeGetRequestForString(String, String)
This helper method makes an HTTP GET request and returns the result as a String
Declaration
public static string MakeGetRequestForString(string requestUrl, string accessToken = null)
Parameters
System. The URL of the request |
System. The AccessToken to use for the request |
Returns
System. The string value of the result |
MakePatchRequestForString(String, Object, String, String)
This helper method makes an HTTP PATCH request and returns the result as a String
Declaration
public static string MakePatchRequestForString(string requestUrl, object content = null, string contentType = null, string accessToken = null)
Parameters
System. The URL of the request |
System. The content of the request |
System. The content/type of the request |
System. The AccessToken to use for the request |
Returns
System. The String value of the result |
MakePostRequest(String, Object, String, String)
This helper method makes an HTTP POST request without a response
Declaration
public static void MakePostRequest(string requestUrl, object content = null, string contentType = null, string accessToken = null)
Parameters
System. The URL of the request |
System. The content of the request |
System. The content/type of the request |
System. The AccessToken to use for the request |
MakePostRequestForString(String, Object, String, String)
This helper method makes an HTTP POST request and returns the result as a String
Declaration
public static string MakePostRequestForString(string requestUrl, object content = null, string contentType = null, string accessToken = null)
Parameters
System. The URL of the request |
System. The content of the request |
System. The content/type of the request |
System. The AccessToken to use for the request |
Returns
System. The String value of the result |
MakePutRequest(String, Object, String, String)
This helper method makes an HTTP PUT request without a response
Declaration
public static void MakePutRequest(string requestUrl, object content = null, string contentType = null, string accessToken = null)
Parameters
System. The URL of the request |
System. The content of the request |
System. The content/type of the request |
System. The AccessToken to use for the request |