POST request from a webpage

Sep 25, 2014 at 12:06 PM
I have created a lisener application using VC++ 2012, which is a command utility. From the webpage, I post anything that is written in an input box. It POST's that value of inputbox in the listener and the listener displays that in console. I am using this code to accomplish this.
$(document).ready(function() {
    $('input[type="text"]').focus(function () {
            $(this).css({ 'background-color': 'lime' });
        });
        
        $('input[type="text"]').blur(function () {
            var color = $(this).css('background-color');
            var value=$(this).val();
            $.ajax({
                type: 'POST',
                url: "http://localhost:2001/",
                // data: { name: value, cc:color },
                data: { name: value},
                
                success: function () {
                      return false;
                }
            });
      $(this).css({'background-color' : 'white'});
        });  
   $('iframe').ready(
   function () { 
        $('iframe').attr('id', 'textframe');
        $('#textframe').css({'border': '3px dashed red' });            
    });
});
In the listener application, I am using this code to get the string.
listener.support(methods::POST,[](http_request req)
    {
        std::cout << "Serving POST" << std::endl;
        req.extract_string(true).then([req](utility::string_t body)
        {
            std::wcout << body << std::endl;
            req.reply(status_codes::OK, U("<html><body>Received.</body></html>"), U("text/html"));
        });
    }); 
I am new to Visual Studio 2012 and Casablanca SDK. Whenever I enter a multi word in any text box separted by space, this is how it displays in the console
maverick + Marline .......
What I want is these words separated by by space as denoted by + sign. I want to every word separated by + sign in a list, how can I accomplish this? As the string_t of casablanca SDK looks bit different.