Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-65316

QVariantMap used in API perhaps not good

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.10.1
    • 5.10.0
    • None
    • 8cce9fa16f3531e1e094a798c007480afa2bcaab

    Description

      http://doc.qt.io/qt-5/qabstractoauth.html

      ...
      virtual QNetworkReply *	get(const QUrl &url, const QVariantMap &parameters = QVariantMap()) = 0
      virtual QNetworkReply *	head(const QUrl &url, const QVariantMap &parameters = QVariantMap()) = 0
      virtual QNetworkReply *	post(const QUrl &url, const QVariantMap &parameters = QVariantMap()) = 0
      virtual QNetworkReply *	put(const QUrl &url, const QVariantMap &parameters = QVariantMap()) = 0
      ...
      

      Sometimes, the parameters is in an order, perhaps duplicate keys, here is a use case:
      https://quizlet.com/api/2.0/docs/sets

      Adding Sets
      ...
      You can create new sets by specifying at least two terms.
      ...
      curl -H "Authorization: Bearer MY_ACCESS_TOKEN" -i -X POST -F "whitespace=1" \
      	-F "terms[]=lait" -F "definitions[]=milk" -F "terms[]=petits pois" \
      	-F "definitions[]=peas" -F "title=My first set via the API" \
      	-F "lang_terms=fr" -F "lang_definitions=en" \
      	https://api.quizlet.com/2.0/sets
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            liaqi Liang Qi
            liaqi Liang Qi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes