Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7217

Auto-detect HTTP body content-type for curl

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.1
    • None
    • None

    Description

      It's nice to be able to leave off the specification of content type when hand crafting a request (i.e. from the command line) and for our documentation examples.

      For example:

      curl http://localhost:8983/solr/query -d '
      {
        query:"hero"
      }'
      

      Note the missing

      -H 'Content-type:application/json'
      

      that would otherwise be needed everywhere

      Attachments

        1. SOLR-7217.patch
          25 kB
          Yonik Seeley

        Issue Links

          Activity

            People

              yseeley@gmail.com Yonik Seeley
              yseeley@gmail.com Yonik Seeley
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: