title: Get context from Main Actor in Akka
body: <p>I'm attempting to shoot fire off a POST request like the one in the Akka docs showed here. <a href="http://doc.akka.io/docs/akka-http/current/scala/http/client-side/request-level.html#request-level-api" rel="nofollow noreferrer">http://doc.akka.io/docs/akka-http/current/scala/http/client-side/request-level.html#request-level-api</a></p>
  
  <p>However, I'm trying to do it as inside of another defined class. If I try to add in anything that requires the <code>Actor context</code> like val <code>http = HTTP(context.system)</code> I get an error. How can I pass in the context into the class I'm trying to make the POST request from?</p>
  
  <pre><code>trait CustomerProfilesComponent {
    def customerProfileManager: CustomerService.Async
  }
  
  object DefaultCustomerProfiles {
    private case class ProfileUpdateData(path: Seq[String], data: JsObject, metadata: JsObject)
  }
  
  trait DefaultCustomerProfiles extends CustomerProfilesComponent {
    self: DatabaseComponent with SourceVersionComponent with ExecutionContextComponent =&gt;
  
    import DefaultCustomerProfiles._
  
    lazy val customerProfileManager = new CustomerService.Async {
  
      import db.api._
      import AvroConverter._
  
      override def getVersion : Future[AvroVersion] = {
        Future.successful(toAvro(sourceVersion))
      }
  }
  </code></pre>