Skip to content
New issue

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

Implement "HEAD" HTTP method #147

Closed
stefan-niedermann opened this issue Dec 17, 2019 · 5 comments
Closed

Implement "HEAD" HTTP method #147

stefan-niedermann opened this issue Dec 17, 2019 · 5 comments

Comments

@stefan-niedermann
Copy link
Member


com.nextcloud.android.sso.exceptions.NextcloudUnsupportedMethodException: The requested HTTP Method is not supported yet! Please contact the developers of the Android Single-On Library for Android
    at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:155)
    at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequestV2(NextcloudAPI.java:148)
    at it.niedermann.owncloud.notes.persistence.NotesClient.requestServer(NotesClient.java:200)
    at it.niedermann.owncloud.notes.persistence.NotesClient.getAvatarEtag(NotesClient.java:163)
    at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper.lambda$updateAvatar$1$NoteServerSyncHelper(NoteServerSyncHelper.java:140)
    at it.niedermann.owncloud.notes.persistence.-$$Lambda$NoteServerSyncHelper$ebqrDd5AoK1YIz4nbNy6Gg1L8Wc.run(Unknown Source:2)
    at java.lang.Thread.run(Thread.java:764)
@David-Development
Copy link
Member

Thanks for the request! Maybe you can elaborate a little bit about the use-case? :)

@stefan-niedermann
Copy link
Member Author

Concrete use case: I tried to check the ETag of an image before downloading the whole payload, to check whether or not the cached version is up to date.

@desperateCoder
Copy link
Contributor

For the "PROPPATCH" method, it would be also nice to have the HTTP annotation working, so I can use SSO for webdav requests as well. Or should I open a new issue?

@desperateCoder
Copy link
Contributor

desperateCoder commented Jan 18, 2020

@stefan-niedermann @David-Development @tobiasKaminsky this exception is not thrown in SSO, it is returned by the files app. This is where the stacktrace leads to (SSO, AidlNetworkRequest.java, Line 152):

        // Handle Remote Exceptions
        if (response.getException() != null) {
            if (response.getException().getMessage() != null) {
/*## HERE ##*/  throw parseNextcloudCustomException(response.getException());
            }
            throw response.getException();
        }

@tobiasKaminsky: any chance, you can add support for HEAD, PROPFIND and PROPPATCH?

@stefan-niedermann
Copy link
Member Author

Currently no longer needed by me. Deck & Notes both have a pull-2-refresh mechanism and i decided that it was the easiest way to simply clear the Glide cache when one triggers this mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants