Skip to content
Snippets Groups Projects

341885: Adds options for rawResponse and disabledCache for update and create resource method.

Merged Pratik Kamble requested to merge issue/api_client-3418939:api_client-3418939 into canary
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Coby Sher
  • Coby Sher
  • Coby Sher
  • Coby Sher
  • Looking good! I think object can be a more specific type, and there are a few duplicate types we can compose out.

    This is pretty much what I had in mind for the return types, thanks for figuring that out!

  • Pratik Kamble added 1 commit

    added 1 commit

    • b8494723 - 3418939: Adds request base option interface and typecasting in the tests.

    Compare with previous version

  • Coby Sher resolved all threads

    resolved all threads

  • 543 * Processes the API response and returns the JSON data.
    544 * @param response - The response object from the API.
    545 * @param cacheKey - The cache key to use for caching the response.
    546 * @param options - (Optional) Additional options for customizing the request. {@link GetOptions | UpdateOptions | CreateOptions}
    547 */
    548 async processApiResponseAndParseBody<T>(
    549 response: Response,
    550 cacheKey: string,
    551 options?: GetOptions | UpdateOptions | CreateOptions,
    552 ): Promise<T> {
    553 const statusCode = response.status;
    554 let json = await response.json();
    555 json = this.serializer
    556 ? (this.serializer.deserialize(json) as T)
    557 : (json as T);
    558 if (this.cache && !options?.disableCache && statusCode < 400) {
  • Pratik Kamble added 1 commit

    added 1 commit

    • e6be8e80 - 3418939: Updates delete request to send both body and response.

    Compare with previous version

  • Pratik Kamble added 1 commit

    added 1 commit

    Compare with previous version

  • Pratik Kamble mentioned in merge request !46 (merged)

    mentioned in merge request !46 (merged)

  • Coby Sher approved this merge request

    approved this merge request

  • LGTM, nice work!

  • Pratik Kamble started a merge train

    started a merge train

  • merged

  • Please register or sign in to reply
    Loading