title: How to define multiple paths for one handler in serverless?
body: <p>I have been trying and searched online, but was not able to find a response. Is it possible to achieve the following using Serverless Framework:</p>
  
  <p>I want to use the <code>get.handler</code> that has the code to the following definition for both getting one item and getting all the items. So:</p>
  
  <ul>
  <li>if I hit <code>api.example.com/items/</code> I retrieve all the items</li>
  <li>if I hit <code>api.example.com/items/1234</code> I retrieve item with <code>id = 1234</code></li>
  </ul>
  
  <pre><code> - get_items:
      handler: project/items/get.handler
      events:
        - http:
            path: items/{itemId}
            method: get
  </code></pre>
  
  <p><strong>So far</strong> in the <code>get.handler</code> I check <code>event.pathParameters? event.pathParameters.itemId : null</code> if the specific item exists and call some <code>getItem(itemdId)</code> function and if it does not exits I call a <code>getAll()</code> function.</p>
  
  <p>If I pass the item id in the path it works, but when I make a request for <code>api.example.com/items/</code> I get the following error:
  <code>not a valid key=value pair (missing equal-sign) in Authorization header</code>. This means something is wrong in my path and I have to pass the item id to the path parameters.</p>
  
  <p><strong>My question is:</strong> Is there a way I can use multiple paths in the <code>- http:</code> area, or what would be a recommended way to solve this issue (just create two separate handlers) ?</p>