繁体   English   中英

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

[英]What's the correct way to send parameters from AngularJS to an Options HTTP API?

在带有参数的选项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 );
        } );

试试这个

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM