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     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.