  }

  public updateRequest(url: string, requestBody: any, eTag: string, endPoint?: string): ng.IPromise<{}> {
    const deferred: ng.IDeferred<any> = this.$q.defer();
    this.getFormDigestValue(this.baseUrl)
      .then((requestDigest: string): ng.IPromise<ng.IHttpPromiseCallbackArg<any>> => {
        return this.$http({
          url: endPoint || this.baseUrl + url,
          method: "POST",
          headers: {
            "accept": "application/json;odata=verbose",
            "X-RequestDigest": requestDigest,
            "content-Type": "application/json;odata=verbose",