Тёмный
No video :(

Error 404 not found while fetching api in react | Axios | Err Bad Request [Solved] 

Copy Paste
Подписаться 40
Просмотров 4,8 тыс.
50% 1

In this video I am demonstrating how to solve the error of bad request (404)

Опубликовано:

 

20 дек 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 29   
@abidhossain2069
@abidhossain2069 5 месяцев назад
const onFinishHandler = async (values) => { try { const res = await axios.post('/api/v1/user/register',values); if (res.data.success) { message.success('Register success!') navigate('/login'); } else { message.error(res.data.message); } } catch (error) { console.log(error); message.error('Something went wrong') } }; still getting this error any solution ?
@CopyPaste0123
@CopyPaste0123 5 месяцев назад
Instead of just adding axios.post('/api/v1/user/register',values); try this: await axios({ method:"post", baseURL:"YOUR BASE URL like localhost:8000/api/v1", url:`/user/register`, data:values }) Replace the baseURL with your actual baseurl Let me know if you encounter further problems!
@mambacurry2448
@mambacurry2448 2 дня назад
@@CopyPaste0123 I would still make the method post if I’m using get? Also this will still work if I’m not creating my own proxy?
@mambacurry2448
@mambacurry2448 2 дня назад
Hello, I’ve been dealing with a similar error, I’m getting errror 404 not found. I didn’t create a proxy, I used a regular localhost. I’m unsure how to fix this
@CopyPaste0123
@CopyPaste0123 2 дня назад
Share the api call you are making
@mambacurry2448
@mambacurry2448 2 дня назад
@@CopyPaste0123 useEffect(() => { axios.get('localhost:5001/api/products') .then(response => { setProducts(response.data); }) .catch(error => { console.error('Error fetching products:', error); }); }, []);
@CopyPaste0123
@CopyPaste0123 2 дня назад
Alright Use this instead axiois({ method:'get', baseUrl: 'localhost:5001/api/', url:'products' })
@advaitnaik6824
@advaitnaik6824 19 дней назад
Can u make video on 304 not modified....i m getting response in v Console but not being rendered
@CopyPaste0123
@CopyPaste0123 19 дней назад
I will..soon
@LearnWithoutSchool
@LearnWithoutSchool 3 месяца назад
I'm getting the problem of axiosError and Internal Server Error. "AxiosError {message: 'Request failed with status code 500', name: 'AxiosError', code: 'ERR_BAD_RESPONSE', config: {…}, request: XMLHttpRequest, …}" code: const newMessages = [...messages, userMessage]; const response = await axios.post("/api/conversation", { messages: newMessages }); I'm actuallty made a GPT Conversation Model. Yesterday it was working great but don't know what happened it is not giving answers to prompt and in console this error is showing!! Please HELP!!!
@CopyPaste0123
@CopyPaste0123 3 месяца назад
Hey,can you test it first on postman ? Share what you got
@LearnWithoutSchool
@LearnWithoutSchool 3 месяца назад
​@@CopyPaste0123 Actually that error is now solved. It was OpenAI API Limit Problem. btw, It was great video learned about handling these kinda errors. It is helpful for future. Thankyou😊🇮🇳
@CopyPaste0123
@CopyPaste0123 3 месяца назад
​@@LearnWithoutSchool glad you liked it.
@frs_23
@frs_23 2 месяца назад
​@@LearnWithoutSchool I am encountering the same error. Can you please help me?
@CopyPaste0123
@CopyPaste0123 2 месяца назад
@@frs_23 Hi, let me know what you are exactly facing
@logupavithranlogupavithran2743
Brother the error is not went 😢
@CopyPaste0123
@CopyPaste0123 День назад
Share your vode snippet
@Janjarlas.backup1
@Janjarlas.backup1 7 дней назад
voice is very lowww
@CopyPaste0123
@CopyPaste0123 7 дней назад
Yeah, will keep in mind next
@chillax5041
@chillax5041 4 месяца назад
hi, can I have your discord id by any chance to ask questions?
@CopyPaste0123
@CopyPaste0123 4 месяца назад
Hey! You can ask anything here without hesitation. I will try to explain and if necessary ,create a video demonstration .If I plan to create a space like discord I will let you know, thanks!
@CopyPaste0123
@CopyPaste0123 Месяц назад
Update : you can ask questions on pastecopy960@gmail.com
Далее
PORTAL SPAMMER🤬🤬🤬| Doge Gaming
00:19
Просмотров 1,6 млн
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
You are using useFetch WRONG! (I hope you don't)
11:14
15  Handling network errors in Axios
5:32
Просмотров 37 тыс.
How to Fix 500 Internal Server Errors
3:35
Просмотров 10 тыс.
What's going on with Windows Laptops?
10:30
Просмотров 2,6 млн
Speed Up Your React Apps With Code Splitting
16:50
Просмотров 376 тыс.