arangodb-net-standard
arangodb-net-standard copied to clipboard
Provide response headers to all API methods
- Added
ApiClientBase.GetResponseAsync()to extract the response body and headers to an object of typeApiResponse<T>whereTis the response type. - Amended
ApiClientBase.GetApiErrorExceptionAsync()to extract header values on error and assign that toApiErrorException.Headers(a new dictionary property). - As an example, I changed
ViewsApiClient.GetAllViewsAsync()to return an object of typeApiResponse<GetAllViewsResponse>instead ofGetAllViewsResponseas it was before. TheApiResponsehas aHeadersdictionary property and will also contain any other data that we want to pass for all responses in the future. - Based on our discussions on this PR, the changes in
ViewsApiClient.GetAllViewsAsync()will be applied to all other API client methods. This is a major breaking change because we are changing the return values of all methods. The intent is to release this as part of v2.0.0 in February 2023.
@DiscoPYF , this PR is the response-related aspect of the feature only. Please the PR for request-related stuff first: https://github.com/ArangoDB-Community/arangodb-net-standard/pull/467
Got it 👍
This pull request appears to be based on the commits from #467 but I'm not sure that's really needed. Anyway, I'll review that other one first then.