mardi 18 septembre 2018

Unable to send.a put request with a header in Rspec

Here's my PUT request:

  put :my_action123, 
    params: { 
      var1: var1,
      var2: var2,
      var3: var3
    }, headers: {
      "X-My-Header" => "something"
    }

And here's an error:

   Failure/Error:
      put :my_action123, 
        params: { 
          var1: var1,
          var2: var2,
          var3: var3
        }, headers: {
          "X-My-Header" => "something"
        }



     ArgumentError:
       unknown keyword: headers

Despite the fact that this what's suggested to use to set headers.

Aucun commentaire:

Enregistrer un commentaire