0

I am trying to PATCH (partially update) Firebase records (firebase.com). This works perfect outside of Google Apps Script using PATCH. GAS is not supporting PATCH and I tried X-HTTP-Method-Override without success. Using GAS with X-HTTP-Method-Override renders the same result as a standard GET. There is no security on my test database. No log-in is required.

var myPayload = "{\"WSD124\" : {\"auction\" : {\"stockno\" : \"ESD124\", \"highbid\" : \"240\"}}}";

var myURL = "https://mydatabase.firebaseio.com/auctions/.json";

var options = { headers: { "X-HTTP-Method-Override" : "PATCH" }, method: "POST", payload: myPayload };

var oResponse = UrlFetchApp.fetch(myURL,options);

2 Answers 2

3

A quick update for those coming back to this old thread - we now support X-HTTP-Method-Override headers on all REST API calls, so this should now work

Sign up to request clarification or add additional context in comments.

Comments

1

UPDATE

This is now supported. See Chris Raynor's answer.

OLD ANSWER

We don't currently support X-HTTP-Method-Override though we are considering it. For now you'll likely have to do a PUT with the whole record. Give us an email at [email protected] if this is significantly blocking you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.