I want to do an HttpRequest in a CloudFunctions function and receive a response.
Language used: TypeScriptProblem i am experiencing
I tried using XMLRequest,
The log is displayed as
XMLHttpRequest is not defined
Apparently XMLHttpRequest seems to be a built-in object in the web browser, but
If so, what library to use
Can I make an HttpRequest in a CloudFunctions function and receive a response?
I don't know how to solve it.
Someone could teach me a solution?
Thanks for your cooperation.
Answer # 1
You can write it normally using fetch
You may use the following library
Note that if the Firebase project is a free plan, requests outside of Google will not be thrown, so let's change to a pay-per-use plan such as Blaze
As described in Cloud Functions' outbound networking
- typescript - upper limit of the number of functions of electron context bridge
- python - i was able to upload with cloud functions of gcp (google cloud platform), but an error occurred in the test
- typescript - i want to collect functions that store values in react state
- python - when i make a request to the outside from gcp's cloud functions, it fails
- typescript - i want to combine react functions into one
- i want to mock a function component and perform a unit test
- unit test - permission_denied in firestore rules test
- when deploying in firebase, i get an error that @ typescript-eslint is not unique
- about typescript shape inference and casting
- typescript - i want to save the image to storage with react x firebase and get downloadurl
- compile error due to possible null in firebase+typescript+vue typedef
- typescript - [react] best conversion timing when data format is different between server and screen display
- nodejs - if you use tsc -watch tsconfigjson command but there is a file, it will get angry and you cannot execute it
- authentication - when using firebase, where should i refer to the user information displayed on the front side, such as currentu