Azure / Azurite

A lightweight server clone of Azure Storage that simulates most of the commands supported by it with minimal dependencies
MIT License
1.76k stars 311 forks source link

Azurite HTTP Interface Impossible to Use from the Command Line. #2422

Open jkempf42 opened 2 weeks ago

jkempf42 commented 2 weeks ago

Which service(blob, file, queue, table) does this issue concern?

All

Which version of the Azurite was used?

v3

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

DockerHub

What's the Node.js version?

NA

What problem was encountered?

Can't easily curl to Azurite

Steps to reproduce the issue?

I finally figured out how to do this after 2 days of searching online.

If possible, please provide the debug log using the -d parameter, replacing \<pathtodebuglog> with an appropriate path for your OS, or review the instructions for docker containers:

-d "<pathtodebuglog>"

Please be sure to remove any PII or sensitive information before sharing!
The debug log will log raw request headers and bodies, so that we can replay these against Azurite using REST and create tests to validate resolution.

Have you found a mitigation/solution?

There is no blog or web page with an easily 'Getting started' that instructs you how to curl at Azurite. I finally figured it out after 2 days of trying. The Github README (here)[https://github.com/Azure/Azurite?tab=readme-ov-file] is filled with details, but there is no simple explanation about how to test using curl whether Azurite is running. There is an assumption that everyone is going to use a language SDK or Storage Explorer, which might not be true. Some folks will want to use the HTTP interface. You need a simple explanation of how a user can test the installation using the CLI after it is finished.

blueww commented 2 weeks ago

@jkempf42

Thanks for raising this issue!

For using curl to send request to Azurite, it just like other command line tools to send rest API request to Azurite (or to product Azure Storage server).

If you know how to using curl on product Azure storage server, send request to Azurite is very similar, only the endpoint is different. And we have a section to description the endpoint https://github.com/Azure/Azurite?tab=readme-ov-file#ip-style-url

Please note, there are multiple tools to send rest API request, we can't add doc for each kind of tools. Since Azurite is an Azure Storage server emulator, Azurite doc will more focus on the difference usage on product Azure vs Azurite, instead of difference usage of each client tool (this is out of Azurite scope).

Thanks for your understanding!