title: Cloud Endpoints HTTP Cookies
body: <p>I am implementing Cloud Endpoints with a Python app that uses custom authentication (<a href="https://github.com/dound/gae-sessions" rel="nofollow noreferrer">GAE Sessions</a>) instead of Google Accounts.  I need to authenticate the requests coming from the Javascript client, so I would like to have access to the cookie information.</p>
  
  <p>Reading <a href="https://stackoverflow.com/questions/15056830/getting-raw-http-data-headers-cookies-etc-in-google-cloud-endpoints">this other question</a> leads me to believe that it is possible, but perhaps not documented.  I'm not familiar with the Java side of App Engine, so I'm not quite sure how to translate that snippet into Python. Here is an example of one of my methods:</p>
  
  <pre><code>class EndpointsAPI(remote.Service):
    @endpoints.method(Query_In, Donations_Out, path='get/donations',
                      http_method='GET', name='get.donations')
    def get_donations(self, req):
      #Authenticate request via cookie
  </code></pre>
  
  <p>where <code>Query_In</code> and <code>Donations_Out</code> are both ProtoRPC messages (<code>messages.Message</code>).  The parameter <code>req</code> in the function is just an instance of <code>Query_In</code> and I didn't find any properties related to HTTP data, however I could be wrong.</p>