See here for examples of how to form HTTP requests and handle the server's response*.
You'll also need to format the string to be translated to handle spaces etc, will you not?
Finally, that JSON parser seems like an awful lot of code to use if you'll only ever be looking for the text between '"translatedText":"' and '"'. :o/
*You could use a 'http::' stream directly, of course, but you'd lose some error checking.
You'll also need to format the string to be translated to handle spaces etc, will you not?
Finally, that JSON parser seems like an awful lot of code to use if you'll only ever be looking for the text between '"translatedText":"' and '"'. :o/
*You could use a 'http::' stream directly, of course, but you'd lose some error checking.