CrmServiceClient.ExecuteCrmWebRequest(HttpMethod, String, String, Dictionary<String,List<String>>, String) CrmServiceClient.ExecuteCrmWebRequest(HttpMethod, String, String, Dictionary<String,List<String>>, String) CrmServiceClient.ExecuteCrmWebRequest(HttpMethod, String, String, Dictionary<String,List<String>>, String) Method

Definition

Executes a web request against Xrm WebAPI.

public System.Net.Http.HttpResponseMessage ExecuteCrmWebRequest (System.Net.Http.HttpMethod method, string queryString, string body, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders, string contentType = null);
member this.ExecuteCrmWebRequest : System.Net.Http.HttpMethod * string * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * string -> System.Net.Http.HttpResponseMessage
Public Function ExecuteCrmWebRequest (method As HttpMethod, queryString As String, body As String, customHeaders As Dictionary(Of String, List(Of String)), Optional contentType As String = null) As HttpResponseMessage

Parameters

method
HttpMethod HttpMethod HttpMethod

Method to use for the request

queryString
String String String

Here you would pass the path and query parameters that you whish to pass onto the WebAPI.
The format used here is as follows: {APIURI}/api/data/v{instance version}/querystring.
For example, if you wanted to get data back from an account, you would pass the following: accounts(id) which creates: get - https://myinstance.crm.dynamics.com/api/data/v9.0/accounts(id) if you were creating an account, you would pass the following: accounts which creates: post - https://myinstance.crm.dynamics.com/api/data/v9.0/accounts - body contains the data.

body
String String String

Content your passing to the request

customHeaders
Dictionary<String,List<String>>

Headers in addition to the default headers added by for Executing a web request

contentType
String String String

Content Type attach to the request. this defaults to application/json if not set.

Returns

Applies to