Thread: Execute HTTP command from C++ Code

  1. #1
    Registered User
    Join Date
    Jun 2014
    Posts
    6

    Execute HTTP command from C++ Code

    Hi All,

    So I'm working on a project that's got a lot of moving parts, from feedback from a position sensor to real-time video editing. The script that runs the sensor is in C++, and the API for the video editing software (vMIX) is executed with HTTP protocol. I'm hoping to use that C++ script to control the video software (as some of the editing is dependent on particular feedback from the sensor), and wanted to see if anyone knew how to execute a HTTP command from a C++ script.

    Thanks!
    Matt

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    since you're running on windows, I'd recommend looking at WinHTTP or WinInet. Perhaps you could post a link to the vMIX API reference, and give the board members a better idea of what kind of interface it is. If it's SOAP-based, you could use something like Staff or gSOAP.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I would recommend C++ REST (aka Casablanca). It works pretty well, though it's still a little low level. Nevertheless, I have experience with it and I have managed to implement a program that talk with Google's APIs with it.
    I'd pair it with Cereal for JSON decoding.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Registered User
    Join Date
    Jun 2014
    Posts
    6
    Here's the link to the API reference -- they don't give much in terms of examples (forgive me, I've never used HTTP before, and certainly not in the context of calling it from a .cpp file)

    vMix Help




    Quote Originally Posted by Elkvis View Post
    since you're running on windows, I'd recommend looking at WinHTTP or WinInet. Perhaps you could post a link to the vMIX API reference, and give the board members a better idea of what kind of interface it is. If it's SOAP-based, you could use something like Staff or gSOAP.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Execute a command from C code in a different terminal
    By poornaMoksha in forum C Programming
    Replies: 5
    Last Post: 12-13-2011, 08:04 AM
  2. execute the run command from c program ...?
    By sma88 in forum C Programming
    Replies: 2
    Last Post: 02-22-2010, 09:35 AM
  3. Execute shell command from other user
    By LuckyStr in forum C++ Programming
    Replies: 12
    Last Post: 08-24-2009, 03:48 PM
  4. How to execute a console command from your app?
    By GUIPenguin in forum C# Programming
    Replies: 2
    Last Post: 07-06-2006, 09:36 AM
  5. Execute Command from C fcn in DLL
    By karcheee in forum Windows Programming
    Replies: 2
    Last Post: 07-27-2005, 03:42 PM

Tags for this Thread