Web requests - crud api

First, try to update any city’s name to be ‘flag’. Then, delete any city. Once done, search for a city named ‘flag’ to get the flag.

Having trouble with this one for some reason, am I not understanding the question correctly?

Below are the commands I am using:

Hey,

I found that exercise to be hit or miss. I think an easy fix is to try deleting two cities then search for the city named flag. I thought that worked for me when I did it, but its been a little bit.
-onthesauce

1 Like

Yup! That worked for me. I wish it was a bit more clear.

Thank you so much.

You really have to look around to solve it since the question is very confusing but in general it is easy since you have to do it like this:
‘{“city_name”:“flag”,“country_name”:“”}’, because you have to leave the country_name empty since this is the one that stores the flag and I think that is where people make mistakes

1 Like


Worked for me

1 Like

thanks but shouldnt include the flag lol

Thanks, I believe that I deleted at least 10 countries trying to find a solution :joy:

1 Like

curl -X DELETE SERVER_IP:PORT/api.php/city/*