# 502 Bad GATEWAY

**URL:** <https://community.deeplearning.ai/t/502-bad-gateway/355511>\
**Category:** Machine Learning in Production\
**Created:** [June 13, 2023, 10:11am UTC](https://community.deeplearning.ai/t/502-bad-gateway/355511 "2023-06-13T10:11:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nnaemeka\_Nwankwo](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@Nnaemeka\_Nwankwo](https://community.deeplearning.ai/u/Nnaemeka_Nwankwo)\
**Post date:** [June 13, 2023, 10:11am UTC](https://community.deeplearning.ai/t/502-bad-gateway/355511/1 "2023-06-13T10:11:41Z")

</div>

In the week one lab I tried consuming my service and followed the instruction. the instruction says we can’t access it using the http but from the navigation bar but when I try it shows me 502 error.

 ![Screenshot (265)](https://global.discourse-cdn.com/dlai/original/3X/d/9/d96fbce8036f52bfd3c8fe3888f38c5136fa5a94.png) how can I rectify this issue.

---

<div class="post-metadata">

**Author:** ![Isaak\_Kamau](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/isaak_kamau/32/124242_2.png) [@Isaak\_Kamau](https://community.deeplearning.ai/u/Isaak_Kamau)\
**Post date:** [June 14, 2023, 1:18pm UTC](https://community.deeplearning.ai/t/502-bad-gateway/355511/2 "2023-06-14T13:18:37Z")

</div>

Hello @Nnaemeka_Nwankwo  
Try to:  
Refresh the Page  
Clear Browser Cache  
Check Network Connectivity eg firewall restrictions, misconfigured network settings…

Let me know if it works

---

<div class="post-metadata">

**Author:** ![vigen](https://avatars.discourse-cdn.com/v4/letter/v/91b2a8/32.png) [@vigen](https://community.deeplearning.ai/u/vigen)\
**Post date:** [June 21, 2023, 8:35pm UTC](https://community.deeplearning.ai/t/502-bad-gateway/355511/3 "2023-06-21T20:35:39Z")

</div>

Probably you stopped server application. Just start it and try again.

---

<div class="post-metadata">

**Author:** ![Nnaemeka\_Nwankwo](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@Nnaemeka\_Nwankwo](https://community.deeplearning.ai/u/Nnaemeka_Nwankwo)\
**Post date:** [July 3, 2023, 3:00pm UTC](https://community.deeplearning.ai/t/502-bad-gateway/355511/4 "2023-07-03T15:00:05Z")

</div>

I thank you so much guys. I got the message “Congratulations! Your API is working as expected.” sorry I am just replying to messages. It has been a few rough weeks, but I am glad I am back. one more question as regards the fastAPI integrated client to see it working what must I do next? in other to get to this part in the image below the instructions are not so clear to me.

 ![Screenshot (286)](https://global.discourse-cdn.com/dlai/original/3X/5/f/5f5adc6cd6738466c251d056d81e7cc2fcf34e5a.png)

---

<div class="post-metadata">

**Author:** ![Nnaemeka\_Nwankwo](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@Nnaemeka\_Nwankwo](https://community.deeplearning.ai/u/Nnaemeka_Nwankwo)\
**Post date:** [July 5, 2023, 8:49pm UTC](https://community.deeplearning.ai/t/502-bad-gateway/355511/5 "2023-07-05T20:49:42Z")

</div>

Hello, I did it on my local system and I got the response “Congratulations! Your API is working as expected" but I want to know what next to do as regards Instructions to use the client API I don’t understand the instructions please If I can be guided or the instructions clearer I would be very glad.  
Kind regards.

---

<div class="post-metadata">

**Author:** ![Isaak\_Kamau](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/isaak_kamau/32/124242_2.png) [@Isaak\_Kamau](https://community.deeplearning.ai/u/Isaak_Kamau)\
**Post date:** [July 6, 2023, 9:34am UTC](https://community.deeplearning.ai/t/502-bad-gateway/355511/6 "2023-07-06T09:34:08Z")

</div>

Hello @Nnaemeka_Nwankwo

Congratulations on successfully deploying a model with FastAPI!, Now you can start doing Inference/making predictions with the deployed model.

**GET Requests** : is typically used for retrieving information from the server

**POST Requests** : is typically used for sending data to the server, such as making predictions or performing actions that require a payload in the request body.

How to use:

- Structure the data that you’ll send to your API endpoint using JSON format
- send the POST request to the server.

Here is an example of a JSON format:  
{  
“fixed\_acidity”: 7.2,  
“volatile\_acidity”: 0.3  
}

Replace the values with the specific data

Regards  
Isaak

---

<div class="post-metadata">

**Author:** ![Nnaemeka\_Nwankwo](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@Nnaemeka\_Nwankwo](https://community.deeplearning.ai/u/Nnaemeka_Nwankwo)\
**Post date:** [July 6, 2023, 3:47pm UTC](https://community.deeplearning.ai/t/502-bad-gateway/355511/7 "2023-07-06T15:47:24Z")

</div>

thank you so much @Isaak_Kamau for the help. I am now trying to rerun my notebook locally again it is showing

 ![Screenshot (289)](https://global.discourse-cdn.com/dlai/original/3X/d/3/d3540609834e3cd814678d538d7d39273fe48d42.png)  
me this error but I previously used it. should I downgrade or set protocol?  
kind regards,  
Emeka

---

<div class="post-metadata">

**Author:** ![Nnaemeka\_Nwankwo](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@Nnaemeka\_Nwankwo](https://community.deeplearning.ai/u/Nnaemeka_Nwankwo)\
**Post date:** [July 11, 2023, 12:11pm UTC](https://community.deeplearning.ai/t/502-bad-gateway/355511/8 "2023-07-11T12:11:02Z")

</div>

Thank you so much @vigen I got the congratulatory message. But now, I tried re-running the notebook and I am getting an error.  
PS- I am running the notebook on my local machine.
