AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

^jsonopen and PATCH parameter
 
 

Hello,
I’m trying to export data to a REST server using the PATCH method (Firebase does that).
But it seems that the functionality is not implemented ... or that I do not do the right thing.

when I send my PATCH
$_response = ^jsonopen(transient PATCH $_url $_jsonmyvar $_header $_userAgent)

:trace json tells me that : “jsonopen- only POST, GET, PUT AND DELETE allowed”

Oops, I do things that are not allowed. Has anyone ever encountered this problem?

 

 
  [ # 1 ]

Not currently supported. Will involve additional calls for logging in, etc.

 

 
  [ # 2 ]

For those who would have to solve the same problem, here is the temporary solution that I found :

I use PUT method on a specific node with user_ID like this :

^“https://MyBase.firebaseio.com/MyNewNode/$share_cs_uid/.json?auth=MyAuth”

...

$_response = ^jsonopen(transient PUT $_url $_jsonmyvar $_header $_userAgent)
if($_response) { ^log(Firebase responded with ^jsontree($_response))}
else {PUT failed - no response}


FYI, unsing PUT in Rest Firebase API overwrites all pre-existing data in the target node as well as all child nodes… so be careful.

 

 
  login or register to react