<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Hosts</title><link>https://community.telligent.com/community/11/w/developer-training/65131/hosts</link><description /><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>Hosts</title><link>https://community.telligent.com/community/11/w/developer-training/65131/hosts</link><pubDate>Mon, 03 Aug 2020 21:05:40 GMT</pubDate><guid isPermaLink="false">b47b270f-0a48-4885-b624-4767bc86bb86</guid><dc:creator>Former Member</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65131/hosts#comments</comments><description>Current Revision posted to Developer Training by Former Member on 08/03/2020 21:05:40&lt;br /&gt;
&lt;p&gt;The host is the primary interaction point in the SDK. &amp;nbsp;It is through the host that you will setup your environment to use the SDK and through the host you will interact with the SDK.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="What_is_a_Host" name="What_is_a_Host"&gt;&lt;/a&gt;What is a Host?&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;A host is any class that extends the RestHost abstract class:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;Telligent.Evolution.Extensibility.Rest.Version1.RestHost&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You can view the full source &lt;a href="https://github.com/Telligent/Community-Rest-SDK/blob/master/src/Telligent.Rest.SDK/Api/RestHost.cs"&gt;here&lt;/a&gt;. &amp;nbsp; NOTE: The interface of RestHost is considered an API, the implementation of it is not.&lt;/p&gt;
&lt;p&gt;In the SDK we ship 2 types of host, a [[Default REST Host]] and [[Client Credentials REST Host]]. &amp;nbsp;You can also create your own [[Custom REST Host]] if the need arises. &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hosts once implemented can be configured or instantiated differently depending on how the Host is written. &amp;nbsp; For example the [[Default REST Host]] self instantiates through a loading method and a configuration file while the [[Client Credentials REST Host]] is instantiated like any normal class.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;a id="How_Hosts_Work" name="How_Hosts_Work"&gt;&lt;/a&gt;How Hosts Work&lt;/h2&gt;
&lt;p&gt;As mentioned a host implementation can do many things, but any host has very specific roles in the SDK. &amp;nbsp;These fundamentals are required by any host implementation. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hosts are responsible for knowing about your community.&lt;/strong&gt; &amp;nbsp;Specifically where it is. &amp;nbsp;Since this is a REST SDK it is important to know the URL of the community.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hosts are responsible&amp;nbsp;for authentication.&lt;/strong&gt; &amp;nbsp;Any requests made to REST via the SDK are relayed through a host and as such the host is responsible for attaching authentication information to each request.&amp;nbsp; Currently all hosts in the SDK use OAuth, so that means when a REST request is made, the host is responsible for adding the token to the request. &amp;nbsp;Alternatively a custom host could be written that uses API keys. &amp;nbsp;A Host is NOT responsible&amp;nbsp;for understanding the current user, this would be something specific to an implementation of a host, not generic functionality. &amp;nbsp;You will see how hosts handle this in host specific topics.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hosts manage cache. &amp;nbsp;&lt;/strong&gt;By default a host exposes a simple memory based cache and access to it.&amp;nbsp; It does not however manage the items in cache, only the existence of the cache. &amp;nbsp;Cache can in turn be used by the implementation as needed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hosts provide the REST interface. &amp;nbsp;&lt;/strong&gt;It is through the host that you make all your GET/PUT/POST and DELETE requests. &amp;nbsp;For this set there is a response of dynamic, stream, string and XElement. &amp;nbsp;For each of those there is a Sync and Async method if you want to do it in or out of process. &amp;nbsp;The details are covered in [[Basic Requests]]. &amp;nbsp;In addition, Hosts manage things like timeout rules and adding additional headers as needed depending on the hosts specific needs.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[Basic Requests]]&lt;/li&gt;
&lt;li&gt;[[Client Credentials REST Host]]&lt;/li&gt;
&lt;li&gt;[[Default REST Host]]&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Hosts</title><link>https://community.telligent.com/community/11/w/developer-training/65131/hosts/revision/1</link><pubDate>Thu, 13 Jun 2019 19:31:43 GMT</pubDate><guid isPermaLink="false">b47b270f-0a48-4885-b624-4767bc86bb86</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65131/hosts#comments</comments><description>Revision 1 posted to Developer Training by Ben Tiedt on 06/13/2019 19:31:43&lt;br /&gt;
&lt;p&gt;The host is the primary interaction point in the SDK. &amp;nbsp;It is through the host that you will setup your environment to use the SDK and through the host you will interact with the SDK.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="What_is_a_Host" name="What_is_a_Host"&gt;&lt;/a&gt;What is a Host?&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;A host is any class that extends the RestHost abstract class:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;Telligent.Evolution.Extensibility.Rest.Version1.RestHost&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You can view the full source &lt;a href="https://github.com/Telligent/Community-Rest-SDK/blob/master/src/Telligent.Rest.SDK/Api/RestHost.cs"&gt;here&lt;/a&gt;. &amp;nbsp; NOTE: The interface of RestHost is considered an API, the implementation of it is not.&lt;/p&gt;
&lt;p&gt;In the SDK we ship 2 types of host, a [[Default REST Host]] and [[Client Credentials REST Host]]. &amp;nbsp;You can also create your own [[Custom REST Host]] if the need arises. &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hosts once implemented can be configured or instantiated differently depending on how the Host is written. &amp;nbsp; For example the [[Default REST Host]] self instantiates through a loading method and a configuration file while the [[Client Credentials REST Host]] is instantiated like any normal class.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;a id="How_Hosts_Work" name="How_Hosts_Work"&gt;&lt;/a&gt;How Hosts Work&lt;/h2&gt;
&lt;p&gt;As mentioned a host implementation can do many things, but any host has very specific roles in the SDK. &amp;nbsp;These fundamentals are required by any host implementation. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hosts are responsible for knowing about your community.&lt;/strong&gt; &amp;nbsp;Specifically where it is. &amp;nbsp;Since this is a REST SDK it is important to know the URL of the community.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hosts are responsible&amp;nbsp;for authentication.&lt;/strong&gt; &amp;nbsp;Any the requests made to REST via the SDK are relayed through a host and as such the host is responsible for attaching authentication information to each request. &amp;nbsp; Currently all hosts in the SDK use OAuth, so that means when a REST request is made, the host is responsible for adding the token to the request. &amp;nbsp;Alternatively a custom host could be written that uses API keys. &amp;nbsp;A Host is NOT responsible&amp;nbsp;for understanding the current user, this would be something specific to an implementation of a host, not generic functionality. &amp;nbsp;You will see how hosts handle this in host specific topics.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hosts manage cache. &amp;nbsp;&lt;/strong&gt;By default a host exposes a simple memory based cache and access to it. &amp;nbsp; It does not however manage the items in cache, only the existence of the cache. &amp;nbsp;Cache can in turn be used by the implementation as needed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hosts provide the REST interface. &amp;nbsp;&lt;/strong&gt;It is through the host that you make all your GET/PUT/POST and DELETE requests. &amp;nbsp;For this set there is a response of dynamic, stream, string and XElement. &amp;nbsp;For each of those there is a Sync and Async method if you want to do it in or out of process. &amp;nbsp;The details &amp;nbsp;of this is covered in [[Basic Requests]]. &amp;nbsp;In addition Hosts manage things like timeout rules and adding additional headers as needed depending on the hosts specific needs.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[[Basic Requests]]&lt;/li&gt;
&lt;li&gt;[[Client Credentials REST Host]]&lt;/li&gt;
&lt;li&gt;[[Default REST Host]]&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>