title: How to correctly pass params to a put request in angular?
body: <p>When I tested the endpoint through postman the endpoint is working fine , but when I use the endpoint from an HTTP request it no longer work .</p>
  <p>Now I want to pass id and accountId as params to a put request , in postman it works but with my angular code it does not , I dont know the issue , maybe someone has idea. Is the passing of params wrong ?</p>
  <p>right now when i check it the id and accountid was added as request payload which is wrong , it should be like /api/userprofile/inactive?id=20&amp;accountid=4   , it should be a paramter</p>
  <p><a href="https://i.stack.imgur.com/ypcAU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ypcAU.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/C4UES.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C4UES.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/cMlTe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cMlTe.png" alt="enter image description here" /></a></p>
  <p>#Code service</p>
  <pre><code>deactivateUserProfileStatus(id: number, accountId:number) {
      const params = new HttpParams()
        .set('id', id.toString())
        .set('accountId', accountId.toString());
      return this.httpRequestService.put&lt;any&gt;(`${apiBaseUrl}/inactive` , params);
    }
  </code></pre>
  <p>#code component.ts</p>
  <pre><code>deactivateUserProfileStatus(id: number,accountId:number) {
      this.isInProgress = true;
      this._userService
        .deactivateUserProfileStatus(id, accountId)
        .pipe(
          finalize(() =&gt; {
            this.isInProgress = false;
          })
        )
        .subscribe({
          next: (res) =&gt; {
            this._notificationService.showSuccess(
              'User status has been updated successfully.'
            );
            // this.generalForm.disable();
            this.getUserGeneralDetails();
            // this._router.navigate(['transactions']);
          },
          error: (err) =&gt; {
            this._notificationService.showError(
              'Something went wrong, Try again later.'
            );
            this.isInProgress = false;
          },
          complete: () =&gt; {
            this.isInProgress = false;
          },
        });
    }
  </code></pre>