diff --git a/contrib/codecs/http/codecs.go b/contrib/codecs/http/codecs.go
index e3117b9bee37fd775ad1005a4c7d9d015ffcd4c9..28dec6f7606aa392ea07b163b604b47d625c6703 100644
--- a/contrib/codecs/http/codecs.go
+++ b/contrib/codecs/http/codecs.go
@@ -117,6 +117,9 @@ func NewPostCodec(w http.ResponseWriter, r *http.Request) (*HttpCodec, error) {
 			if v.Method == "" {
 				v.Method = pathMethod
 			}
+			if v.ID == nil {
+				v.ID = jsonrpc.NewId(1)
+			}
 		}
 	}
 	return c, nil