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

  • AFISHAL

    AFISHAL

    7 Mart 2009
  • Arun Kumar

    Arun Kumar

    18 Mart 2010
  • sWooZie

    sWooZie

    9 ŞUBAT 2006