uniqush / uniqush-push

Uniqush is a free and open source software system which provides a unified push service for server side notification to apps on mobile devices.
http://uniqush.org
Apache License 2.0
1.53k stars 201 forks source link

How to test http2? #246

Closed strong84 closed 4 years ago

strong84 commented 4 years ago

I added bundleid in addpsp. and added uniqush.http=1 when push.

I used following cmd on macOS: curl -i --http2 http://127.0.0.1:9898/push -d service=http2service -d subscriber=testsubscriber -d msg="Hello World" -d uniqush.http=1

but still get HTTP/1.1 200 OK

TysonAndre commented 4 years ago

The release notes were incorrect. They should say uniqush.http2=1.

HTTP2 is for using HTTP2 for communication from uniqush to APNs, not for communication from the API client to uniqush (not supported). The reason to use http2 for communication with APNs is to support new APNs features as well as a larger supported JSON payload size

srv/apns/push_service.go
243:    if http2, ok := notif.Data["uniqush.http2"]; ok && http2 == "1" {
strong84 commented 4 years ago

Got it! Save my day🎉🎉🎉 Thanks a lot!!!