将参数从AngularJS发送到Options HTTP API的正确方法是什么?

时间:2015-06-03 22:26:26

标签: angular-routing http-options-method

选项HTTP API与参数之间的正确代码是什么?

        return $http( {
            method: 'OPTIONS',
            url: apiUrl + '/Options/' + clientID
        } ).error( function ( a, b, c, d, e ) {
            console.log( 'a, b, c, d, e', a, b, c, d, e );
        } );

1 个答案:

答案 0 :(得分:1)

试试这种方式

        return $http( {
            method: 'OPTIONS',
            url: apiUrl + '/Options?clientID=' + clientID
        } ).error( function ( a, b, c, d, e ) {
            console.log( 'err' );
        } );