title: Trying to Post a JSON onto a URL
body: <p>I'm on step 2 of an application process.  The first step was to use a GET method onto a URL and retrieve a name and email address.</p>
  
  <p>Here is the URL:
  <a href="https://mkpartners.secure.force.com/services/apexrest/careers?firstName=Homer&amp;lastName=Simpson&amp;email=HSimpson@Springfield" rel="nofollow">https://mkpartners.secure.force.com/services/apexrest/careers?firstName=Homer&amp;lastName=Simpson&amp;email=HSimpson@Springfield</a></p>
  
  <p>Now I'm being asked to POST a JSON Object.  Here is the problem:</p>
  
  <pre><code>Congratulations John Quach, you completed Step 1!
  
  Step 2 is as follows:
  Perform a POST to the URL you constructed in Step 1.
  You will need to post an instance of the application object described below.
  You will need to post the body in properly formatted JSON.
  You will need to pass in all required headers.
  Please set the isTest boolean to TRUE while testing, and FALSE when you are ready for your final submission.
  application {
  Boolean isTest (required)
  String firstName (required)
  String lastName (required)
  String email (required)
  String phone (required)
  String zipcode (required)
  String describeYourself (required)
  ool[] objectLanguages (required)
  education[] education (required)
  experience[] experience (required)
  certification[] certs
  }
  
  education {
  String school (required)
  Integer graduationYear (required)
  String degree (required)
  String major (required)
  }
  
  experience {
  String company (required)
  Date fromDate [yyyy-MM-dd] (required)
  Date toDate [yyyy-MM-dd] (required)
  String title (required)
  String workDone (required)
  }
  
  certification {
  String certification (required)
  Date dateCertified [yyyy-MM-dd] (required)
  }
  
  ool {
  String language (required) [must include at least 'javascript'; include any other OOP languages you know]
  Integer proficiency (required) [scale of 0-10, 0 being none, 10 being proficient]
  }
  
  A successful post will result in a code 202 and you will receive an automated email confirmation. Good Luck!
  </code></pre>
  
  <p>I've tried many codes.  I've followed your suggestion and used this based on the code you've given.  I'm using javascript through an HTML page.</p>
  
  <pre><code> &lt;script&gt; 
  var webLink = "https://mkpartners.secure.force.com/services/apexrest/careers?firstName=John&amp;lastName=Quach&amp;email=johnq1216@gmail.com"; 
  
  
  var apply = {
           isTest : false,
           firstName : "John",
           lastName : "Quach",
           email : "johnq1216@gmail.com",
           phone : 6269355016,
           zipcode : 91207,
           describeYourself : "Self Taught Programmer and Developer"
      }
  
  
  function httpPost(theUrl) {
      var xmlHttp = null;
      xmlHttp = new XMLHttpRequest();         
      xmlHttp.open( "POST", theUrl, false);    
      xmlhttp.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); 
      xmlHttp.send(JSON.stringify(apply)); 
  }  
  
  
  httpPost(webLink); 
  &lt;/script&gt;
  //This script will make a POST request. Read above comments.
  </code></pre>
  
  <p>Of course none of it works.  What am I doing wrong?  Do I need the complete JSON Object with the Language, Education, and Certification objects nested in?  The reason I left them out is because I want to get some response from the website and I wanted to keep the answer small.  </p>
  
  <p>Do I need more than just a notepad on my computer to get this JSON object to be posted to the URL?  </p>