Current I am experiencing an issue with my code where, in the last 3 days, I have been unable to successfully complete delete requests using the Google Places API, documented [here](https://developers.google.com/maps/documentation/places/).

Up until Sunday this code would execute and run without an issue as long as the requested place met the conditions in the API, and the only responses I received were of the OK or REQUEST\_DENIED form.

Now, however, whenever I send a request the only responses I receive are of the form INVALID\_REQUEST, which is very inconvenient to say the least. From my understanding, and the testing I performed on this code beforehand, I am complying with the format that they are requesting, so I can't understand why this isn't working.

Can anyone else look at this code and tell me if there are any problems compared to the linked API?

```
public boolean delete(String reference)
{
    try
    {
        System.out.println(reference);
        String url = "https://maps.googleapis.com/maps/api/place/delete/xml?sensor=false&key=API_KEY_HERE";

        String data = "<PlaceDeleteRequest>\n<reference>" + reference + "</reference>\n</PlaceDeleteRequest>";
        System.out.println(data);

        URL xmlUrl = new URL(url);
        HttpPost request = new HttpPost(xmlUrl.toURI());
        request.setEntity(new StringEntity(data));

        HttpClient client = new DefaultHttpClient();
        HttpResponse response = client.execute(request);
        HttpEntity entity = response.getEntity();

        BufferedReader input = new BufferedReader(new InputStreamReader(entity.getContent()));

        String line = "";

        while ((line = input.readLine()) != null) 
        {
            System.out.println(line);
            if (line.contains("<status>"))
            {
                String[] s1 = line.split(">");
                String[] s2 = s1[1].split("<");
                if (s2[0].equalsIgnoreCase("ok"))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }

        input.close();

    }
    catch(Exception e)
    {
        return false;
    }
    return false;
}

```