Hello all I need guidance on passing a textarea data when user clicks the button to GATE cloud api ,I have the REST api url with key and password.My basic form is

<textarea name="message" rows="10" cols="30">Text goes here.</textarea>
<button>Let's do this thing!</button>

My Javascript

(function ($) {
$('button').on('click', function () {
// remove resultset if this has already been run
$('.content ul').remove();
// add spinner to indicate something is happening
$('<i class="fa fa-refresh fa-spin"/>').appendTo('body');

// send data from textarea

// make the AJAX request
$.getJSON , function (data) {

// do all this on success