Results 1 to 7 of 7

Thread: JSON and curl problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: JSON and curl problem

    If you want to run a program with multiple arguments then it is better to use the start() method that takes a QStringList for the program arguments.

    This allows proper escaping of special characters such as quote signs.

    Alternatively to running curl as a child process you could also consider looking at QNetworkAccessManager for doing HTTP calls "natively" in Qt.

    Cheers,
    _

  2. #2
    Join Date
    Jan 2019
    Posts
    5
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: JSON and curl problem

    Thanks, I had tried using the QStringList but got the same result, will revisit again though. I will also try your other suggestions today and report back!!!

  3. #3
    Join Date
    Jan 2019
    Posts
    5
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: JSON and curl problem

    Quote Originally Posted by philmacu View Post
    Thanks, I had tried using the QStringList but got the same result, will revisit again though. I will also try your other suggestions today and report back!!!
    So, I had already tried QProcess with QStringList, but just to be sure I tried it again, and I still get the warning in regards to format error. So I read up on the QNetworkAccessManager class and implemented that, I now get an error <h1>Bad Request</h1>Invalid Request, however the Json statement is correct.

    The manufacturers of the Teltonika Router have quite a good wiki, so I am going to post on that and see if they have any information.

Similar Threads

  1. JSon Problem
    By romzxlat in forum Newbie
    Replies: 5
    Last Post: 4th March 2015, 00:14
  2. Problem while creating QOCIDriver: oci.json not found
    By Momergil in forum Qt Programming
    Replies: 3
    Last Post: 28th August 2013, 21:29
  3. Replies: 2
    Last Post: 27th March 2013, 04:21
  4. Problem with curl writefunction
    By januszmk in forum Qt Programming
    Replies: 5
    Last Post: 27th July 2011, 08:17
  5. Replies: 0
    Last Post: 16th May 2010, 17:53

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.