﻿using System;
using System.Text;
using System.Threading.Tasks;

namespace Meadow.Logging.Log4Net
{
    /// <summary>
    /// The interface for a log client.
    /// </summary>
    public interface ILogClient
    {
        /// <summary>
        /// The URI to send the data to.
        /// </summary>
        Uri Uri { get; }

        /// <summary>
        /// The proxy to use.
        /// </summary>
        Uri Proxy { get; set; }

        /// <summary>
        /// The encoding to use when sending data to the endpoint.
        /// </summary>
        Encoding Encoding { get; set; }

        /// <summary>
        /// Submit the message to the endpoint.
        /// </summary>
        /// <param name="text">The text to submit.</param>
        /// <returns>The endpoint response.</returns>
        string Post(string text);

        /// <summary>
        /// Submit the message to the endpoint.
        /// </summary>
        /// <param name="text">The text to submit.</param>
        /// <returns>The endpoint response.</returns>
        Task<string> PostAsync(string text);
    }
}
