using FHT.Core.Agency.Interfaces; using IO.Swagger.Api; using System; namespace FHT.Agency.Web.CommandServices { public class TopicPostService : ITopicPostService { private readonly TopicPostApiApi _topicPostApi; public TopicPostService(TopicPostApiApi topicPostApi) { _topicPostApi = topicPostApi; string token = new AuthorizationService().Login(); _topicPostApi.Configuration.AddDefaultHeader("Content-Type", "application/json"); _topicPostApi.Configuration.AddDefaultHeader("Authorization", string.Format("bearer {0}", token)); } } }