Class HeaderFormatter
- Namespace
- NetCoreForce.Client
- Assembly
- NetCoreForce.Client.dll
Formats custom HTTP request and response headers used for REST API
public static class HeaderFormatter
- Inheritance
-
HeaderFormatter
- Inherited Members
Methods
IfModifiedSince(DateTimeOffset)
Use the Describe Global resource and the If-Modified-Since HTTP header to determine if an object’s metadata has changed.
public static Dictionary<string, string> IfModifiedSince(DateTimeOffset startDate)
Parameters
startDate
DateTimeOffsetStart date after which to look for changed object metadata
Returns
- Dictionary<string, string>
Single entry dictionary of "If-Modified-Since" with date value in the RFC1123 Pattern
SforceAutoAssign(bool)
Assignment Rule Header
The Assignment Rule header is a request header applied when creating or updating Cases or Leads. If enabled, the active assignment rules are used. If disabled, the active assignment rules are not applied. If a valid AssignmentRule ID is provided, the AssignmentRule is applied. If the header is not provided with a request, REST API defaults to using the active assignment rules.
public static Dictionary<string, string> SforceAutoAssign(bool autoAssign)
Parameters
autoAssign
boolActive assignment rules are applied for created or updated Cases or Leads
Returns
- Dictionary<string, string>
Single entry dictionary of "Sforce-Auto-Assign" with TRUE/FALSE value
SforceCallOptions(string, string)
Call Options Header
Specifies the client-specific options when accessing REST API resources. For example, you can write client code that ignores namespace prefixes by specifying the prefix in the call options header.
public static Dictionary<string, string> SforceCallOptions(string client = "ForceClient", string defaultNamespace = null)
Parameters
client
stringA string that identifies a client.
defaultNamespace
stringA string that identifies a developer namespace prefix. Resolve field names in managed packages without having to specify the namespace everywhere.
Returns
- Dictionary<string, string>
Single entry dictionary of "Sforce-Call-Options" with value of client={client}, defaultNamespace={defaultNamespace}
SforceQueryOptions(int)
Query Options Header
Specifies options used in a query, such as the query results batch size. Use this request header with the Query resource.
public static Dictionary<string, string> SforceQueryOptions(int batchSize)
Parameters
batchSize
intthe number of records returned for a query request
Returns
- Dictionary<string, string>
Single entry dictionary of "Sforce-Query-Options" with value of batchSize={batchSize}