Getting WebDAV door from the API#98
Merged
hailihu merged 5 commits intoJul 14, 2025
Merged
Conversation
This commit adds a function `get_webdav_door` that allows Ada to get the URL of a WebDAV door from the API. Ada does not know about WebDAV doors; it only knows the API's URL. There are two ways you can ask the API for a WebDAV door. Both methods are implemented. If the first method fails, the second will be tried. Testing this function may be a bit difficult, because it is not used yet. I tested it by calling `get_webdav_door "$api"` just before the call to `api_call`. To test the second method, I commented out the first `return` command in `get_webdav_door`. With this function, we can start implementing uploads and downloads into Ada. I'd also like to implement get_api_from_webdav. That would allow users to provide a WebDAV URL if they don 't know the address of the API. But that is less urgent.
Contributor
Author
|
Some improvements:
|
…bDAV found * The WebDAV door should be sent to stdout, that means that any other output should be sent to stderr to keep them separate. * It's nice to print an error message when no WebDAV door could be found. This includes a hint to try with --debug, to speed up troubleshooting.
Contributor
|
Looks good. Let's add tests in a new PR later. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds a function
get_webdav_doorthat allows Ada to get the URL of a WebDAV door from the API.Ada does not know about WebDAV doors; it only knows the API's URL.
There are two ways you can ask the API for a WebDAV door. Both methods are implemented. If the first method fails, the second will be tried.
Testing this function may be a bit difficult, because it is not used yet. I tested it by calling
get_webdav_door "$api"just before the call toapi_call. To test the second method, I commented out the firstreturncommand inget_webdav_door.With this function, we can start implementing uploads and downloads into Ada.
I'd also like to implement get_api_from_webdav. That would allow users to provide a WebDAV URL if they don 't know the address of the API. But that is less urgent.