My app sends requests to the backend for both
/app/api/projects`
and
/app/api/projects/:projectId
Using Chrome devtools, I would like to override both calls to return my own list from /projects
and a custom objects from /projects/1
(where 1
is the project ID).
Seemingly, I am only able to do one of them, but not both:
If I override /projects
first, Devtools creates an override file called projects
under app/api
. Trying to override /projects/1
next creates a weird file in the Page sources tab and does not go to overrides.
Doing the reverse, creates an override file named 1
under app/api/projects
and a weird file under Page sources for the other one.
It literally either or, but not both!
I tried creating a "root" override file under app/api/projects
as a sibling to 1
but Devtools won't let me call it anything resembeling an expected name (/
, .
etc.).
I cannot have both a file and a directory named projects
because they conflict.
There is nothing online on this.
What I expect to happen: Be able to override both endpoints.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745091617a4610725.html
评论列表(0条)