我想对与以下@Action(GetProfile)
GetProfile({ patchState }: StateContext<CompleteUser>, uid: any) {
return this.auth.getUsersProfile(uid.uid).pipe(
tap((usersProfile: User) => {
if (usersProfile.alertsAmount && usersProfile.alertsAmount > 0) {
this.badge.set(usersProfile.alertsAmount);
}
// state.user = usersProfile; <-- Don't do this
patchState({ user: usersProfile });
}),
);
}
请求类似的请求进行测试:
curl
我该怎么做?
当我通过以下方式尝试时:
echo file | gzip | curl -XPOST --data-binary @- -H "Content-Encoding: gzip" -v localhost:9000/
我明白了
ab -p file.gzip -n 100 -c 2 -H "Content-Encoding: gzip" localhost:9000/