File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -234,17 +234,14 @@ WebPushLib.prototype.sendNotification =
234234 }
235235
236236 return new Promise ( function ( resolve , reject ) {
237- console . log ( requestDetails ) ;
238-
239237 const httpsOptions = { } ;
240238 const urlParts = url . parse ( requestDetails . endpoint ) ;
241239 httpsOptions . hostname = urlParts . hostname ;
242240 httpsOptions . port = urlParts . port ;
243241 httpsOptions . path = urlParts . path ;
244242
245243 httpsOptions . headers = requestDetails . headers ;
246-
247- console . log ( httpsOptions ) ;
244+ httpsOptions . method = requestDetails . method ;
248245
249246 const pushRequest = https . request ( httpsOptions , function ( pushResponse ) {
250247 let responseText = '' ;
@@ -255,6 +252,7 @@ WebPushLib.prototype.sendNotification =
255252
256253 pushResponse . on ( 'end' , function ( ) {
257254 if ( pushResponse . statusCode !== 201 ) {
255+ console . log ( responseText ) ;
258256 reject ( new WebPushError ( 'Received unexpected response code' ,
259257 pushResponse . statusCode , pushResponse . headers , responseText ) ) ;
260258 } else {
You can’t perform that action at this time.
0 commit comments