Open wolf-mptechnology opened 1 year ago
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 (get
/ put
/ post
/ delete
/ head
/ patch
) with the @_disfavoredOverload
annotation to prevent breaking due to ambiguity of overloaded return types.
// 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 Data
would likely be removed in the next major version of the library.
if some information returned as header like session id, which is not available when access response headers. How can i access response header fields.
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
Thank you for posting this feature request. Our team will post an update on this ticket.
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.
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