I am getting 301 status using refine-simple-rest although there is not any error on postman.

I am using refine-simple-rest as my data provider to connect with the django rest API but I get back response with 301 although there is not any problem with postman. If I use the same url from postman I get the repose back as normal but on refine app I always get response back with 301 status.
No description
vicious-gold
vicious-gold580d ago
Here is the screenshot of my status code with request url.
Omer
Omer580d ago
Hey @dipbazz 👋 , Could there be a http/https difference? 👀 Or maybe a trailing slash is required? http://API_URL/path/
vicious-gold
vicious-gold580d ago
In my guess actually the problem is my refine-simple-rest is sending request to http://localhost:8000/voters and django server will try to convert the url into http://localhost:8000/voters/ Yes trailing slash is the issue but how can i give a trailing slash in my refine resource urls? The trailing slash is automatically appended at last and I get the response back when using postman. So how can I achieve the same using refine?
Omer
Omer580d ago
You can do this with axios interceptors for example, https://refine.dev/docs/api-reference/core/providers/auth-provider/#setting-authorization-credentials You can add trailing slash before the request is sent 🚀
vicious-gold
vicious-gold580d ago
Okay Thank you @Omer
More Posts
change label of breadcrumbi am using breadcrumb in create page but i am getting its as patients/create i want to change labeluseSelect onSearch without call API cos i got limit call APIcan i call API once and search query without recall API?How to submit a modal form to create a Comment when you are in the Post show page?Given the fact that I'm a first timer using React, Building refine app has been amazing. What I'd liMaking duplicate calls in the apiUsing the github example (finefoods - mui), the application is making duplicate calls in the api Docustom route element not visible{ element:<div> <LayoutWrapper>sssshhhhh</LayoutWrapper> </divpagination not working if i use filtered value and onfilter props in ant table columnfilteredValue={[consultationState]} onFilter={(value:any,record:any)=>{ return recorduseform-metadataBut the error is coming from the UserWithRolesRemove useModal form titleI want to remove title from useModalForm so i gave title ={null } its not workinguseExport with arrays in schemaI have resources that have array fields, which I am spreading to fields like `arrayItem.0.name, arrastartswith operatorstartswith operator not supportedediting usemodal form footeri am having a custom button in antmodal footer footer={<Button >okk</Button>} if i click on this sasetFilters for json objectis there a way to apply nested filters for json b object retuning from usetable , using setFiltersfiltering ant table based on useSelect hookconsider i have select dropdown where i have values as one, two and three . Below i have ant table wselectionSet issueError: unexpected null value for type "uuid": {"response":{"errors":[{"extensions":{"path":"$.selectselection sort issuefield "krseva_frequencies" not found in type: 'query_root': {"response":{"errors":[{"extensions":{"pmigration issues./node_modules/@pankod/refine-react-router/dist/esm/index.js 49:10-11 export 'useIsAuthenticated' (iNested Filtering in useTablehow to do nested filtering in useTable hook?Strapi issue.I am trying to replicate the invoice generator from here: https://refine.dev/blog/refine-react-adminantd filter tableconsider an example of antd table with columns as name,age,dob,and id . i am able to filter ant tablhow to select an item from dropdown listhow to select an item from dropdown list through click and pass that selected element to another com