Pull requests

#1 Merged
Repository
jrschumacher jrschumacher
Branch
default
Repository
maxpert maxpert
Branch
default

Added HTTP request data and emulate REST features

Author
  1. Ryan Schumacher
Reviewers
Description

Been working with BackboneJS with my HTML5 app and PUT and DELETE are not supported in HTML5 DRAFT.

Fixed a bug with strtolower on the wrong line.

Comments (2)

  1. Zohaib Sibte Hassan repo owner

    On line 169 why would you need || $param === FALSE in if check? I think its pretty useless. Also uemulateREST returns nothing however on line 604 and 605 you are trying to use its return value.

    1. Ryan Schumacher author

      Line 169: $param is false so the user can the emulate off. However you bring up a good point if you set emulate to an empty string it essentially does the same. I believe I set the the FALSE parameter so it is easier for the user to understand it being ON if it is a STRING or OFF if it is FALSE.

      If you look at line 173 you will see it does return a value. Since you use a functional approach to MiMViC which also seems very javascript-ish in style I decided to implement uemulateREST similar to many javascript frameworks (i.e. jQuery, Backbone) where the function sets a value if parameter is set or returns a value if the parameter is not set.

      One bug I found though is:

      Line 170, I am doing strtolower on the param, but really needs it on Line 605