Fix route_utils.get_api_call_path() (#10897)
* Fix route_utils.get_api_call_path() to strip only the trailing slash
* Enhance test_get_api_call_path_queue_join
* add changeset
* Fix typo
* Fix comment
* Refactoring; use request.url's method instead of httpx's
* Fix get_api_call_path() to search the target string only in url.path because it doesn't have to match in other parts in the URL string
* Enhance test_get_api_call_path_generic_call
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>