Back to list
Views:   4K
Replies:  0

Using $.ajax with a REST service that is built with WCF

In our app we're using $.ajax to post client data back to the server, but I keep on getting a 400 error. 
Can anyone tell me what is wrong here?   

     url: "http://localhost/restservices.svc/Document",
     type: "POST",
     data: '{source: "New York", type: "PDF"}',
     contentType: "application/json; charset=utf-8",
     success: function (message) { alert("success: " + message.status); },
     error: function (message) { alert("failure: " + message.status); }

Humbert Addison, Feb 20, 2013

Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas.      Vsn 1.3.0