Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class HttpClientExtensions

Adds extneion methods for http client

Inheritance
System.Object
HttpClientExtensions
Namespace: EPiServer.Commerce.ODP.Internal
Assembly: EPiServer.Commerce.ODP.dll
Version: 14.26.0
Syntax
public static class HttpClientExtensions : Object

Methods

CreateField(HttpClient, SchemaObjectCreateField, Action<String>, ILogger, String, out Int32)

Create the required fields needed in ODP

Declaration
public static void CreateField(this HttpClient httpClient, SchemaObjectCreateField createField, Action<string> uiNotifier, ILogger logger, string objectName, out int errorCount)
Parameters
Type Name Description
System.Net.Http.HttpClient httpClient

The http client

SchemaObjectCreateField createField

The model respresenting the field to create

System.Action<System.String> uiNotifier
Microsoft.Extensions.Logging.ILogger logger

The logger

System.String objectName
System.Int32 errorCount

CreateIdentifier(HttpClient, CreateIdentifier, Action<String>, ILogger, out Int32)

Create the required fields needed in ODP

Declaration
public static void CreateIdentifier(this HttpClient httpClient, CreateIdentifier createIdentifier, Action<string> uiNotifier, ILogger logger, out int errorCount)
Parameters
Type Name Description
System.Net.Http.HttpClient httpClient

The http client

CreateIdentifier createIdentifier
System.Action<System.String> uiNotifier
Microsoft.Extensions.Logging.ILogger logger

The logger

System.Int32 errorCount

GetFields(HttpClient, Action<String>, ILogger, String, out Int32)

Gets the current fields for specified object in ODP

Declaration
public static IEnumerable<SchemaObjectField> GetFields(this HttpClient httpClient, Action<string> uiNotifier, ILogger logger, string objectName, out int errorCount)
Parameters
Type Name Description
System.Net.Http.HttpClient httpClient

The http client

System.Action<System.String> uiNotifier

The UI notifier for scheduled job

Microsoft.Extensions.Logging.ILogger logger

The logger

System.String objectName
System.Int32 errorCount
Returns
Type Description
System.Collections.Generic.IEnumerable<SchemaObjectField>

An System.Collections.Generic.IEnumerable<>