Skip to content
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

Access http response metadata? #17

Open
nahuel-soldevilla opened this issue Apr 7, 2021 · 0 comments
Open

Access http response metadata? #17

nahuel-soldevilla opened this issue Apr 7, 2021 · 0 comments

Comments

@nahuel-soldevilla
Copy link
Member

(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;
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant