开发者

WCF 4.0 Restful URl

How can i be able to have the apikey on a wcf 4.0 rest开发者_如何学Goful service based on the ron jacobs tutorial to be in the following format

Example /customer/{apikey}/{other or no parameter}

Currently am only able to achieve the following /customer?apikey=8484734739-43948&parm2=ui


Warning: I don't do Jquery, I copied this off some random web site and changed it a bit.

jQuery.ajaxSetup({
    'beforeSend': function(xhr) {xhr.setRequestHeader("Authorization", "myapikey 8484734739-43948")}
})


Simply for reference:

To append the api key to all requests, use the following code:

jQuery.ajaxSetup({
  data: {
    apiKey: '8484734739-43948'
    ,parm2: 'ui'
  }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜