-
Notifications
You must be signed in to change notification settings - Fork 200
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
Header Fields in API Response #3285
Comments
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you! |
Thank you for posting this feature request. Our team will post an update on this ticket. |
An option to explore here is creating overloads for each of the methods ( // exists today - `RESTTask.Success` is a typealias for `Data`.
func get(request: RESTRequest) async throws -> RESTTask.Success
// new overload -- where `NewReturnType` encapsulates the additional information.
@_disfavoredOverload
func get(request: RESTRequest) async throws -> NewReturnType The existing method that returns |
if some information returned as header like session id, which is not available when access response headers. |
I am facing this issue with NodeJS library of amplify. |
Hi @viru-rathore, are you using this library? https://github.com/aws-amplify/amplify-js If so, please open an issue over there with more details |
Hi, has any update been shared on this request? I'm running into the same issue where we need to get the etag from response headers on a 200 response but I am not able to find any documentation on how this can be achieved. Thanks. |
@SurajBastola-BO Hi, unfortunately there is no update on this request. We'll post on this issue when there's any update to provide. |
Thank you. Is this something that has been or is being prioritized on your roadmap? |
@SurajBastola-BO I'll bring this up in our next planning meeting, seeing that this has received quite a few thumbs up. |
Is your feature request related to a problem? Please describe.
We need to fetch the eTag header to implement our own caching. On Android this is already possible, on iOS we only get the data.
Describe the solution you'd like
The access should be similar to the Android version:
Describe alternatives you've considered
It seems there is no way to access response headers at all or it is unclear from the documentation:
https://docs.amplify.aws/lib/restapi/fetch/q/platform/ios/#get-requests
Is the feature request related to any of the existing Amplify categories?
API
Additional context
No response
The text was updated successfully, but these errors were encountered: