title: How to solve this design problem: Inheriting from class that is abstracted to a interface?
body: <p>I'm having a hard time to grasp a solution for the following problem.</p>
  
  <p>I am decoupling the classes with their correspondent interface but I need to extend the class for a new change instead of changing the original implementation in order to be compliant with open close principle.</p>
  
  <p>This the base class HttpRequest implementing IHttpRequest</p>
  
  <pre><code>public class HttpRequest : IHttpRequest
  {
      public string RawUrl { get; protected set; }
  
      public HttpRequest(string rawUrl)
      {
          RawUrl = rawUrl;
      }
  
      public string GetJsonFromUrl(string url)
      {
          //
      }
  }
  
  public interface IHttpRequest
  {
      string GetJsonFromUrl(string url);
  }
  </code></pre>
  
  <p>and the extended class is UrlMetadataResolver:</p>
  
  <pre><code>public class UrlMetadataResolver : HttpRequest
  {
      public UrlMetadataResolver(string rawUrl) : base(rawUrl)
      {
          //
      }
  }
  </code></pre>
  
  <p>What should I do? should I created an interface for UrlMetadataResolver (IUrlMetadataResolver)?</p>
  
  <p>If that's the case it becomes even more confusing.</p>
  
  <p>Thanks</p>