title: Auto-Complete in AMP with POST method
body: <p>I have a problem in AMP page. I want to build a page with <strong>AutoComplete</strong> list selection like <strong>jquery AutoComplete</strong>.</p>
  
  <p>Amp give Example for Autocomplete Selection. But there is a problem. I have <strong>API with POST Method</strong> in this example I don't know how to set Request method Post in it with a different <strong>origin</strong>.</p>
  
  <pre><code>  &lt;div class="form-item city-state"&gt;
          &lt;label&gt;City&lt;/label&gt;
          &lt;input name="city"
            type="text"
            on="
              input-debounced:
                AMP.setState({
                  query: event.value,
                  showDropdown: event.value,
                }),
                autosuggest-list.show;
              tap:
                AMP.setState({
                  query: query == null ? '' : query,
                  showDropdown: 'true'
                }),
                autosuggest-list.show"
            [value]="query || ''"
            value=""
            required
            autocomplete="off" /&gt;
        &lt;/div&gt;
        &lt;div class="suggest"&gt;
          &lt;div class="autosuggest-container hidden"
            [class]="(showDropdown &amp;&amp; query) ?
              'autosuggest-container' :
              'autosuggest-container hidden'"&gt;
            &lt;amp-list class="autosuggest-box"
              layout="fixed-height"
              height="120"
              src="/advanced/autosuggest/search_list"
              [src]="query ?
                autosuggest.endpoint + query :
                autosuggest.emptyAndInitialTemplateJson"
              id="autosuggest-list"&gt;
              &lt;template type="amp-mustache"&gt;
                &lt;amp-selector id="autosuggest-selector"
                  keyboard-select-mode="focus"
                  layout="container"
                  on="
                    select:
                      AMP.setState({
                        query: event.targetOption,
                        showDropdown: false
                      }),
                      autosuggest-list.hide"&gt;
                  {{#results}}
                  &lt;div class="select-option no-outline"
                    role="option"
                    tabindex="0"
                    on="tap:autosuggest-list.hide"
                    option="{{.}}"&gt;{{.}}&lt;/div&gt;
                  {{/results}} {{^results}}
                  &lt;div class="select-option {{#query}}empty{{/query}}"&gt;
                    {{#query}}Sorry! We don't ship to your city {{/query}}
                  &lt;/div&gt;
                  {{/results}}
                &lt;/amp-selector&gt;
              &lt;/template&gt;
            &lt;/amp-list&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
  
  &lt;amp-state id="autosuggest"&gt;
    &lt;script type="application/json"&gt;
      {
        "endpoint": "/advanced/autosuggest/search_list?q=",
        "emptyAndInitialTemplateJson": [{
          "query": "",
          "results": []
        }]
      }
    &lt;/script&gt;
  &lt;/amp-state&gt;
  </code></pre>