Ignore:
Timestamp:
08/20/13 13:54:43 (11 years ago)
Author:
mwindhouwer
Message:

Made the ISOcat API more RESTful:

  • create resources using POST
  • update resources using PUT

One outlier: we use POST for creating users eventhough the client in this case specifies the full resource URL
Other outliers: in many cases we allow a dummy 0 for a POST call, e.g., POST /dcs/0 to create a new DCS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat/data/CR.js

    r2288 r3447  
    187187                        this.cdf(this.toCDF(grp,tdg,descr,dcs,copies));
    188188                       
    189                         var req = this.send("PUT");
     189                        var req = this.send("POST");
    190190                        if (req != null) {
    191191                                this.created(req);
     
    272272    CR_prototype.update = function(status,msg) {   
    273273                if (this.status() != "NEW") {
    274                         var req = this.send("POST");
     274                        var req = this.send("PUT");
    275275                        if (req != null) {
    276276                                this.updated(req);
Note: See TracChangeset for help on using the changeset viewer.