I am communicating to a REST server which is expecting something like http://example.com/1.0/editor/5/bla/26 along with body parameters of x, y, and z.  Or maybe instead of /1.0/editor/5/bla/26, it should be 1.0/editor/5/bla/what about item #26, but of course with what about item #26 escaped.
There are many post describing how to use jQuery.param() to encode parameters, however, that is not my question. How chould the actual url be created using jQuery of JavaScript?
$.ajax({
    type:'PUT',
    url:'/1.0/editor/'+$('#id').val()+'/bla/'+$('#wha').data('id'),
    data:{x:x,y:y,z:z},
    success: function (error){}
});
 
    