Results 1 to 2 of 2

Thread: Help Sending Information to a WCF REST Service and Handling the Respone

  1. #1
    Sencha User
    Join Date
    Jun 2012
    Vote Rating

    Default Help Sending Information to a WCF REST Service and Handling the Respone


    I am brand new with ExtJS.

    I currently have a basic Login form that is supposed to send username and password information to a WCF service that checks the information and returns a custom message object in Json with the format {"success":true , "token": "token_string"}. success is a bool and token is a string in C#.

    I know the WCF service works as intended because sending a POST method to the url at which the service is hosted with the appropriate Json message using Fiddler returns the desired output.

    However, attempting to submit the information via an Ext Form Submit, it always returns as a failure. In addition, I have the form attempt to output the accept.result, and it always shows up as undefined.

    Here is the code for my button click event:

    onButtonClick: function(button, e, options) {
    if(this.getForm().isValid()){ this.getForm().submit({ method: 'POST', url: 'url_of_the_service', success: function(form, action) { Ext.Msg.alert('Login Successful!'); }, failure: function(form, action) { Ext.Msg.alert('Login Failure!'+action.result); } }); }
    My main question is: Is there anyway I can see the request this form is sending to the url, using fiddler or other means to see if it is being sent correctly? Also, I want to display the "token" property returned in the Ext.Msg.alert, just to see if everything works correctly. How would I go about doing that?

    Thanks for your time.

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    Look at the network tab in the developer tools in your browser
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts