GithubHelp home page GithubHelp logo

Comments (4)

tomakehurst avatar tomakehurst commented on July 19, 2024

Could you give me a little more detail?

If you send me your stub definitions the source for test.html I might be able to help.

from wiremock.

yangtao309 avatar yangtao309 commented on July 19, 2024

src/mian/wiremock/__files/node/sms/open.json
{
"nodeId":1, "name":"测试短信", "unsubscribeEnabled":true, "blacklistDisabled":true,
"redlistEnabled":false, "deliveryChannelId":null, "testPhoneString":"13274432210,13564382312,18609415322",
"messageValue":"这是一条测试短信",
"deliveryChannelList" : [
{"gatewayId":1, "gatewayName":"亿美软通", "gatewayPrice":0.05, "gatewayBalance": "1000.2", "gatewayType":1, "wordsLimit": 67}]
}

src/main/wiremock/mappings/node/sms/open-mapping.json
{
"request": {
"method": "GET",
"urlPattern": "/node/sms/[0-9]+"
},
"response": {
"status": 200,
"bodyFileName": "/node/sms/open.json",
"headers": {
"Content-Type": "application/json",
"Cache-Control": "max-age=86400"
}
}
}

src/main/webapp/test.html

<script src="http://code.angularjs.org/1.0.6/angular.min.js"></script> <script src="scripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
var as = angular.module('ccmsIndex',[]);
as.controller('mainController', function ($scope, $http){
    $scope.navis = {
    "nav":[
        {"name":"首  页","url":"#/index"},
        {"name":"经营分析","url":"#/analysis/evaluateSearch"},
        {"name":"系统管理","url":"#/manage/userManage"},
        {"name":"营销活动","url":"#/"},
        {"name":"事件活动","url":"#/"},
        {"name":"会员管理","url":"#/"},
        {"name":"客户管理","url":"#/"},
        {"name":"模板管理1","url":"#/"},
        {"name":"模板管理2","url":"#/"},
        {"name":"模板管理3","url":"#/"}
    ],
    "name":"skip.qian",
    "noticeCount":58
}

    jQuery.ajax({
        url: "http://localhost:8080/node/sms/1",
        type: "GET",
        dataType: "json",
        success: function (response) {
            console.log("success");
        },
        error: function (response) {
            console.log("failed");
        }
    });
});
</script>

from wiremock.

yangtao309 avatar yangtao309 commented on July 19, 2024

the problem is solution! thank you !
i will be close the issue.

from wiremock.

tomakehurst avatar tomakehurst commented on July 19, 2024

Glad to hear you've worked it out!

from wiremock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.