Skip to content

Having problems deleting file via REST api - getting 404 #1765

Closed
@astanton

Description

@astanton

I have some cloud code that I'm calling from my parse instance that is the following:

Parse.Cloud.httpRequest({
            method: 'DELETE',
            url: url,
            headers: {
                'X-Parse-Application-Id': process.env.APP_ID,
                'X-Parse-Master-Key': process.env.MASTER_KEY
            }
        }).then(function(httpResponse) {
            console.log(httpResponse.text);
        }, function(httpResponse) {
            console.error('Request failed with response code ' + httpResponse.status);
        })

I'm getting the message Request failed with response code 404 in the heroku log. I'm positive that the url exists that I'm passing in because I can hit it in my browser and it downloads the image that I am trying to delete.

I'm also positive that my process.env.APP_ID and process.env.MASTER_KEY are correct as well since I've printed those to the log as well and seen them.

Is there another step that I'm missing here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions