Skip to content

Conversation

@milanmajchrak
Copy link
Collaborator

@milanmajchrak milanmajchrak commented Jul 3, 2025

@milanmajchrak milanmajchrak requested a review from Copilot July 3, 2025 07:48

This comment was marked as outdated.

@milanmajchrak milanmajchrak changed the title Added post method to pass data as text/plain content type Updated api_get methods - try reauthenticate when 401 or 403 Jul 4, 2025
@milanmajchrak milanmajchrak requested a review from Copilot July 4, 2025 13:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances HTTP methods to retry on authentication failures and adds a new header set for plain text requests.

  • Added text_plain_request_headers for text/plain content type
  • Updated api_get to retry on 403 CSRF errors and 401 authentication errors
  • Mirrored retry logic in api_post_uri for consistent behavior
Comments suppressed due to low confidence (1)

dspace_rest_client/client.py:172

  • [nitpick] Update the api_get docstring to reflect that it now also retries on 401 (reauthentication) and 403 (CSRF token refresh).
        """

@milanmajchrak milanmajchrak requested a review from vidiecan July 4, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants