SORU
4 Aralık 2011, Pazar


Connect.js methodOverride ne yapar?

very terse documentation connect.js diyor methodOverride

Faux HTTP yöntem destek sağlar.

Bu ne anlama geliyor? obvious Google search yararlı daha azdır. Neden methodOverride yararlı mı?

CEVAP
4 Aralık 2011, Pazar


  • DELETE taklit ve bunun için 5, ** methodOverride isterseniz.
  • Eğer _method sonrası iletirseniz parametre olarak ayarlayın< . em^'' . sil ya< . em^''o zaman app.delete app.put app.post her zaman (böylece daha açıklayıcı, ayrıntılı) kullanmak yerine Express:

Arka uç:

// the app
app.put('/users/:id', function (req, res, next) {
  // edit your user here
});

İstemci mantığı:

// client side must be..
<form> ...
  <input type="hidden" name="_method" value="put" />
</form>

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • emimusic

    emimusic

    10 Mart 2006
  • Excel Functions

    Excel Functi

    4 NİSAN 2010
  • Mega64

    Mega64

    24 ŞUBAT 2006