Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase storage and Invalid HTTP method/URL pair

When I try to fetch a firebase storage file using ReactReader, I get the following error:

{
"error": {
"code": 400,
"message": "Invalid HTTP method/URL pair."
}
}

The code is making a request to https://firebasestorage.googleapis.com/v0/b/....

but that returns the error above.

Has anyone run into this issue?

like image 923
Chris Hansen Avatar asked Nov 20 '25 02:11

Chris Hansen


1 Answers

I have got this problem, but no t for security reason, but when I would put a file in a subdir.

I was (with Postman) trying: https://firebasestorage.googleapis.com/v0/b/*YOURBUCKET*.appspot.com/o/Test/test.pdf

And I got exactly this error ("message": "Invalid HTTP method/URL pair.").

The problem was the encoding of the url. It must be "encoded" and the "/" must the code, like so:

https://firebasestorage.googleapis.com/v0/b/*YOURBUCKET*.appspot.com/o/Test**%2F**test.pdf

No more erros.

like image 85
Serge Angéloz Avatar answered Nov 24 '25 22:11

Serge Angéloz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!