title: How to test Mirror API Subscriptions
body: <p>The restrictions of a https callbackUrl and the nature of the subscriptions as a whole makes it seem like this is something that can only be done with a publicly accessible url.</p>
  
  <p>So far I have come across two potential solutions to make local development / debugging easier.</p>
  
  <p>The first is the <a href="https://developers.google.com/glass/subscription-proxy" rel="noreferrer">Subscription Proxy</a> service offered by google. This workaround essentially lets you remove the SSL restriction and proxy subscription callbacks to a custom URL. </p>
  
  <p>The second and most helpful way I have found to do development locally is to capture a subscription callback request (say from a server that is publicly accessible) into a log and then use curl to reproduce that request on your local/dev machine using something like:</p>
  
  <pre><code>curl -H "Content-type: application/json" -X POST \
    -d '{"json for":"the notification"}' http://localhost:8080/notify
  </code></pre>
  
  <p>Since the requests can sometimes be large, or you might want to test multiple callback types, I also found it useful to put the JSON of the subscript request into various files (ex: <code>timeline-respond.json</code>) and then run </p>
  
  <pre><code>curl -H "Content-Type: application/json" \
    --data @timeline-respond.json http://localhost:8080/notify
  </code></pre>
  
  <p>I'm curious as to what other people are doing to test their application subscriptions locally.</p>