如何使用apache bench发送压缩的有效载荷?

时间:2019-12-23 15:36:16

标签: http curl apachebench

我想对与以下@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/

0 个答案:

没有答案