web/app/views/imports/show_post_import.html.erb
author Marcel Hlopko <marcel@hlopko.com>
Fri, 31 Oct 2014 17:50:24 +0100
changeset 249 d6e4f3690b6a
parent 110 02126b7e1cbb
permissions -rw-r--r--
Fix imports page, change json archive path

<%= currently_importing "post" %>

<div class="row">
  <div class="col-sm-12">
    <legend>Upload via HTTP POST</legend>
    <p>
      Benchmark data are required to be sent using POST method.
      Both <strong>x-www-form-urlencoded</strong> and <strong>JSON</strong>
      content types are supported. Example <strong>curl</strong> parameters:
    </p>
  </div>

  <div class="col-xs-12 col-lg-6">
    <pre>
      curl '<%= push_imports_url %>'  \
        --compressed \
        -H 'Content-Type: application/x-www-form-urlencoded' \
        --data-urlencode 'import={"timestamp": "2013-06-25T10:30:03Z","configuration": ... }'
    </pre>
  </div>

  <div class="col-xs-12 col-lg-6">
    <pre>
    curl '<%= push_imports_url %>'  \
      --compressed \
      -H 'Content-Type: application/json' \
      --data '{"timestamp": "2013-06-25T10:30:03Z","configuration": ... }'
    </pre>
  </div>
</div>