We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried to generate a node from the following code and I am getting an error
"xmLHttpRequest is not defined"
whenever the code is run (as a google cloud function)
this is my code
import 'package:firebase_functions_interop/firebase_functions_interop.dart'; import 'package:rest_client/rest_client.dart' as rc;
void main() { functions['sendInvites'] = functions .region('us-central1') .firestore .document('/invitations/{id}') .onCreate(createHook); } Future<void> createHook(DocumentSnapshot snapshot, EventContext context) async { final name = snapshot.data.getString('name'); final data = DocumentData.fromMap({'name': name}); await snapshot.firestore.collection('/bar').add(data); // // print('posting $jsonToPost'); var client = rc.Client(); var request = rc.Request( url: 'http://myurl:1337/parse/classes/profile', headers: { "X-Parse-Application-Id": "mysuperawesomekey", "X-Parse-Master-Key": "theyshouldchangemastertosomethngelse" }, body: '{"name" : "$name"}', method: rc.RequestMethod.post); try { await client.execute(request: request); } catch (e) { print(e); } }
do you have any idea how i can get this to work
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I tried to generate a node from the following code and I am getting an error
"xmLHttpRequest is not defined"
whenever the code is run (as a google cloud function)
this is my code
import 'package:firebase_functions_interop/firebase_functions_interop.dart';
import 'package:rest_client/rest_client.dart' as rc;
do you have any idea how i can get this to work
The text was updated successfully, but these errors were encountered: