title: error sending network request PATCH with Firebase Storage
body: <p>I got this Error while trying to update Metadata of file using Firebase Storage.</p>
  
  <p>error sending network request PATCH <a href="https://firebasestorage.googleapis.com/v0/b/rootssahaj.appspot.com/o/notice%2Fthumbs" rel="nofollow">https://firebasestorage.googleapis.com/v0/b/rootssahaj.appspot.com/o/notice%2Fthumbs</a>
                                                                 java.net.ProtocolException: Unknown method 'PATCH'; must be one of [OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE]</p>
  
  <pre><code>10-16 12:31:04.819 2043-3160/com.rana.sahaj.myyu W/ExponenentialBackoff:   network unavailable, sleeping.
  10-16 12:31:04.819 2043-3160/com.rana.sahaj.myyu W/NetworkRequest: error sending network request PATCH https://firebasestorage.googleapis.com/v0/b/rootssahaj.appspot.com/o/notice%2Fthumbs
                                                                 java.net.ProtocolException: Unknown method 'PATCH'; must be one of [OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE]
                                                                     at java.net.HttpURLConnection.setRequestMethod(HttpURLConnection.java:685)
                                                                     at com.android.okhttp.internal.http.HttpsURLConnectionImpl.setRequestMethod(HttpsURLConnectionImpl.java:144)
                                                                     at brq.b(:com.google.android.gms.DynamiteModulesC:242)
                                                                     at brq.a(:com.google.android.gms.DynamiteModulesC:269)
                                                                     at brk.onTransact(:com.google.android.gms.DynamiteModulesC:53)
                                                                     at android.os.Binder.transact(Binder.java:361)
                                                                     at com.google.android.gms.internal.zzans$zza$zza.zzuj(Unknown Source)
                                                                     at com.google.android.gms.internal.zzanv.zza(Unknown Source)
                                                                     at com.google.android.gms.internal.zzanm.zza(Unknown Source)
                                                                     at com.google.android.gms.internal.zzanm.zzd(Unknown Source)
                                                                     at com.google.firebase.storage.zzf.run(Unknown Source)
                                                                     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                     at     java.lang.Thread.run(Thread.java:841)
  </code></pre>
  
  <p>The code for updating Metadata is:</p>
  
  <pre><code>FirebaseStorage storage = FirebaseStorage.getInstance();
      final StorageReference storageRefNonThumbs = storage.getReferenceFromUrl(constants.FIREBASE_STORAGE_URL + "/notice/nonThumbs");
      final StorageReference storageRefThumbs = storage.getReferenceFromUrl(constants.FIREBASE_STORAGE_URL + "/notice/thumbs");
  
      UploadTask uploadTaskThumb = storageRefThumbs.child(timestamp + EmailPref).putFile(DOCUri);
      final StorageMetadata metadata = new StorageMetadata.Builder()
              .setContentType(DocMiMEType)
              .build();
  
  storageRefThumbs.updateMetadata(metadata).addOnSuccessListener(new OnSuccessListener&lt;StorageMetadata&gt;() {
          @Override
          public void onSuccess(StorageMetadata storageMetadata) {
              // Updated metadata is in storageMetadata
              storageRefNonThumbs.updateMetadata(metadata)
                      .addOnSuccessListener(new OnSuccessListener&lt;StorageMetadata&gt;() {
                          @Override
                          public void onSuccess(StorageMetadata storageMetadata) {
                              // Updated metadata is in storageMetadata
                              //  Uri downloadUrlNonThumb = taskSnapshot.getDownloadUrl();
  
                              // saveData(editText, null, downloadUrlThumb.toString(), mTime, timestamp, null, null, null, downloadUrlNonThumb.toString());
                              Log.e("SahajLOG98", "Success in MEtaData@@22***");
                          }
                      })
                      .addOnFailureListener(new OnFailureListener() {
                          @Override
                          public void onFailure(@NonNull Exception exception) {
                              // Uh-oh, an error occurred!
                          }
                      });
          }
      })
  </code></pre>