Skip to content

Access http response metadata? #17

Description

@nahuel-soldevilla

(Logging some features discussed during the hackaton, which are not currently available at least to my knowledge)

Use case: read totalCount and use it for some pagination control. This is how we usually do it using angular httpclient:

 this.http.get(this.context.source + '/germplasm', {
      params: {
        studyDbId: this.context.studySelected.studyDbId,
        page: (this.page - 1).toString(),
        pageSize: this.pageSize.toString(),
      }
    }).subscribe((res: any) => {
      this.germplasm = res.result.data;
      this.totalCount = res.metadata.pagination.totalCount;
    });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions