MAUI / Django Serializer - Trailing slash added
I have a MAUI app that connects to an API to collect some data.
I am handling the API width django.
Whatever I try, it seems a trailing slash is added automatically at the end of the path which creates an error.
logs:
method=GET path="/api/some-model/?userprofile_id=105/"
Received userprofile_id: 105/
Error during processing: Field 'id' expected a number but got '105/'.
On the API side the trailing slash does not appear, which makes me think its on the server side.
int userId = int.Parse((Shell.Current as AppShell).userID);
string url = $"api-path/?userprofile_id={userId}"; # url = api-path/?userprofile_id=105
API<List<Model>>.Get(
url,
OnModelSuccess,
OnModelError);
On Django side, I have set APPEND_SLASH = True
and listed below the path of my api:
router.register(r'api-path', APIPATHViewSet, basename='apipath')
Any idea how I could remove the trailing slash from the request?