NBoomackClient
Show / Hide Table of Contents

Class ClientConfiguration

This class represents the configuration for the BoomackClient. It contains information about how to reach the Boomack Server, what timeout to use for HTTP API requests, and which response format is accepted.

Additionally, it contains a dictionary with the media type mapping. The media type mapping maps filename patterns to media types, when using the fluent API.

Inheritance
object
ClientConfiguration
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Boomack.Client
Assembly: NBoomackClient.dll
Syntax
public class ClientConfiguration

Properties

Builder

The entry point to the fluent API for building a client configuration.

Call BuildConfiguration() to complete the build of the configuration.

Declaration
public static IBoomackClientBuilder Builder { get; }
Property Value
Type Description
IBoomackClientBuilder

Default

The default configuration for a local Boomack Server without API authentication on the standard port 3000. The timeout is 20 seconds, the accepted response format is plain text and the type mapping is the hardcoded mapping from the library.

Declaration
public static ClientConfiguration Default { get; }
Property Value
Type Description
ClientConfiguration

RequestTimeout

The timeout for HTTP API requests.

Declaration
public TimeSpan RequestTimeout { get; set; }
Property Value
Type Description
TimeSpan

ResponseFormat

The accepted response format for HTTP API requests.

Declaration
public ResponseFormat ResponseFormat { get; set; }
Property Value
Type Description
ResponseFormat

ResponseMimeType

A read-only property to get the actual media type from ResponseFormat.

Declaration
public string ResponseMimeType { get; }
Property Value
Type Description
string

ServerUrl

The URL of the Boomack Server.

Declaration
public Uri ServerUrl { get; set; }
Property Value
Type Description
Uri
Examples

new Uri("http://127.0.0.1:3000")

new Uri("https://dashboard.my-domain.com")

Token

The authentication token for HTTP API requests. Is only required, if the API authentication is configured on the Boomack Server.

Declaration
public string Token { get; set; }
Property Value
Type Description
string

TypeMapping

The media type mapping from filename patterns to media types. Is used by the fluent API for display requests.

The keys in the dictionary are patterns for filenames with the following placeholders:

  • * for none or any number of characters
  • ? for exactly one character

The values in the dictionary are media types.

Declaration
public IDictionary<string, string> TypeMapping { get; set; }
Property Value
Type Description
IDictionary<string, string>
Examples
    new Dictionary<string, string>()
    {
        { "*.log", "text/plain" },
        { ".gitignore", "text/x-ignore" },
        { "*.xyz", "application/x-y-z" },
    }
In This Article
Back to top
Boomack Homepage