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 =
234
234
}
235
235
236
236
return new Promise ( function ( resolve , reject ) {
237
- console . log ( requestDetails ) ;
238
-
239
237
const httpsOptions = { } ;
240
238
const urlParts = url . parse ( requestDetails . endpoint ) ;
241
239
httpsOptions . hostname = urlParts . hostname ;
242
240
httpsOptions . port = urlParts . port ;
243
241
httpsOptions . path = urlParts . path ;
244
242
245
243
httpsOptions . headers = requestDetails . headers ;
246
-
247
- console . log ( httpsOptions ) ;
244
+ httpsOptions . method = requestDetails . method ;
248
245
249
246
const pushRequest = https . request ( httpsOptions , function ( pushResponse ) {
250
247
let responseText = '' ;
@@ -255,6 +252,7 @@ WebPushLib.prototype.sendNotification =
255
252
256
253
pushResponse . on ( 'end' , function ( ) {
257
254
if ( pushResponse . statusCode !== 201 ) {
255
+ console . log ( responseText ) ;
258
256
reject ( new WebPushError ( 'Received unexpected response code' ,
259
257
pushResponse . statusCode , pushResponse . headers , responseText ) ) ;
260
258
} else {
You can’t perform that action at this time.
0 commit comments