code: public ServerRedirect updateServerRedirectHost(int serverMappingId, String hostHeader) {
          ServerRedirect redirect = new ServerRedirect();
          BasicNameValuePair[] params = {
              new BasicNameValuePair("hostHeader", hostHeader),
              new BasicNameValuePair("profileIdentifier", this._profileName)
          };
          try {
              JSONObject response = new JSONObject(doPost(BASE_SERVER + "/" + serverMappingId + "/host", params));
              redirect = getServerRedirectFromJSON(response);
          } catch (Exception e) {
              e.printStackTrace();
              return null;
          }
          return redirect;
      }
docs: Update server mapping's host header
  
  @param serverMappingId ID of server mapping
  @param hostHeader value of host header
  @return updated ServerRedirect