Property HttpClient
HttpClient
Sets or returns an HttpClient instance used to make calls to the AfterPay API. If null/unset, the system will create it's own instance on first use.
Declaration
public HttpClient HttpClient { get; set; }
Property Value
Type | Description |
---|---|
HttpClient |
Remarks
The library reserves the right to modify the provided client, such as setting default headers. A client can be shared amongst configuration object, but should not be shared/use outside of other AfterPayClient instaces. The primary purpose of this method is to allow a client with injected handlers to be used. If you do not need to inject custom handlers, then leave this blank.
Exceptions
Type | Condition |
---|---|
System.InvalidProgramException | Thrown if this property is modified after it has been passed to a AfterPayClient instance. |