Sending multiple parameters to REST service created with wizard using POS

3 posts, 0 answers
  1. Awni
    Awni avatar
    3 posts
    Member since:
    Apr 2012

    Posted 12 Apr 2012 Link to this post

        protected DispatchOADomainModel.Call OnUpdateItem(string id, DispatchOADomainModel.Call newValue)
            {
                try
                {
                    this.dataManager.UpdateEntity(newValue);
                    return newValue;
                }
                catch (OpenAccessException)
                {
                    throw new Exception(Convert.ToString(HttpStatusCode.BadRequest));
                }
            }
  2. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 17 Apr 2012 Link to this post

    Hi Awni,

     Can you try passing the Id parameter in the query string of the URI that you are sending the Http POST request to. The URI should contains something like: http://localhost/yourrestserviece/updatecalls?id=3.  

    All the best,
    Zoran
    the Telerik team
    Telerik OpenAccess ORM Q1 2012 release is here! Check out what's new or download a free trial >>
  3. DevCraft banner
  4. Awni
    Awni avatar
    3 posts
    Member since:
    Apr 2012

    Posted 24 Apr 2012 Link to this post

    hi,
    Thanks for the reply, issue RESOLVED. 
    I re-read the code generated by the wizard and it uses PUT method for Update, not POST. My bad, sorry :)

    For reference, when sending an id as a parameter, the correct format does not contain the word "id", it's just:
    http://localhost/Disp/Calls.svc/2930?format=json 
    2930 being the id here. 


    thanks again and keep up the good work! 

    Regards,
    awni
Back to Top