@@ -108,11 +108,11 @@ function HttpRequest(serviceNameOrConn, input, init = {}) {
108108
109109 method = method . toUpperCase ( ) ;
110110
111- if ( ( init . body != null || isRequest ( input ) && input . body !== null ) && ( method === 'GET' || method === 'HEAD' ) ) {
111+ if ( ( init . body !== null || isRequest ( input ) && input . body !== null ) && ( method === 'GET' || method === 'HEAD' ) ) {
112112 throw new Error ( 'HttpRequest with GET/HEAD method cannot have body' ) ;
113113 }
114114
115- let inputBody = init . body != null ?
115+ let inputBody = init . body !== null ?
116116 init . body :
117117 isRequest ( input ) && input . body !== null ?
118118 clone ( input ) :
@@ -129,7 +129,7 @@ function HttpRequest(serviceNameOrConn, input, init = {}) {
129129 inputBody = this . body ;
130130 }
131131
132- if ( inputBody != null && ! headers . has ( 'Content-Type' ) ) {
132+ if ( inputBody !== null && ! headers . has ( 'Content-Type' ) ) {
133133 const contentType = this . extractContentType ( inputBody ) ;
134134 if ( contentType ) {
135135 headers . append ( 'Content-Type' , contentType ) ;
@@ -283,10 +283,10 @@ HttpRequest.prototype.getRequestOptions = async function() {
283283
284284 // HTTP-network-or-cache fetch steps 2.4-2.7
285285 let contentLengthValue = null ;
286- if ( this . body == null && / ^ ( P O S T | P U T ) $ / i. test ( this . getMethod ( ) ) ) {
286+ if ( this . body === null && / ^ ( P O S T | P U T ) $ / i. test ( this . getMethod ( ) ) ) {
287287 contentLengthValue = '0' ;
288288 }
289- if ( this . body != null ) {
289+ if ( this . body !== null ) {
290290 this . body . get
291291 const totalBytes = this . getTotalBytes ( this . body ) ;
292292 if ( typeof totalBytes === 'number' ) {
0 commit comments