title: Server Returns Bad Request 400 On REST POST CALL, even though uri is correct
body: <p>I am trying to add an option label and option value to an optionset field(new_contractserving) found on an entity called new_servingtime. Not sure if I am doing this correctly, but the server throws a 400 Bad request, what's the issue?!</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var entity = {
  
                  "new_contractserving": String(OptionValue),
                  "new_contractserving@OData.Community.Display.V1.FormattedValue": String(OptionText)
              };
  
              var reqJSON = new XMLHttpRequest();
              reqJSON.open("POST", url + "/api/data/v8.2/new_servingtimes", false);
              reqJSON.setRequestHeader("OData-MaxVersion", "4.0");
              reqJSON.setRequestHeader("OData-Version", "4.0");
              reqJSON.setRequestHeader("Accept", "application/json");
              reqJSON.setRequestHeader("Content-Type", "application/json; charset=utf-8");
              reqJSON.onreadystatechange = function () {
                  if (this.readyState === 4) {
                      reqJSON.onreadystatechange = null;
                      if (this.status === 204) {
                          var uri = this.getResponseHeader("OData-EntityId");
                          var regExp = /\(([^)]+)\)/;
                          var matches = regExp.exec(uri);
                          var newEntityId = matches[1];
                      } else {
                          Xrm.Utility.alertDialog(this.statusText + ": Third Request!");
                          return;
                      }
                  }
              };
              reqJSON.send(entity);</code></pre>
  </div>
  </div>
  </p>