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'
}
});
精彩评论