Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Multiple request params on HttpParams not honored. #226

Open
bjornharvold opened this issue Oct 31, 2021 · 1 comment
Open

🐛 Multiple request params on HttpParams not honored. #226

bjornharvold opened this issue Oct 31, 2021 · 1 comment

Comments

@bjornharvold
Copy link

I just installed this plugin with the settings you defined in the readme in my AppModule. Immediately, a form directive that was using the code below started failing. Upon further inspection, we could see that it would only include the last param we set. The moment we removed convoyr from AppModule, both request params were back on the url.

Example:

@Injectable({providedIn: 'root'})
export class HotelUrlNameService {
  isUrlNameAvailable(hotelIdentifier: string, urlName: string): Observable<UniqueResult> {

    const params = new HttpParams()
    .set('hotelIdentifier', hotelIdentifier)
    .set('urlName', urlName)
    ;

    return this.httpClient.get<UniqueResult>(`${this.environment.inventoryAPIEndpointBaseURL}/api/administration/hotel/urlname`, { params });
  }

  constructor(private readonly httpClient: HttpClient,
              @Inject(ENVIRONMENT) private readonly environment: any) {
  }
}
@bjornharvold
Copy link
Author

I initially thought there was a regression error with @angular/router and filed a ticket here: angular/angular#43999. But realized quickly afterwards that this has to do with this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant