当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript reqwest.default函数代码示例

本文整理汇总了TypeScript中reqwest.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了default函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: getResult

export function getResult(toSend: { token: string }, successCallback: (result: { error?: boolean, description?: string }) => void) {
    reqwest({
        url: '/result_killer',
        method: 'post',
        data: toSend,
        error: () => {
            successCallback({
                error: true
            })
        },
        success: successCallback
    });
}
开发者ID:anstarovoyt,项目名称:dmmquest,代码行数:13,代码来源:Dispatcher.ts

示例2: loadTeam

export function loadTeam(toSend: TeamsRequest, successCallback: (res: TeamsResponse) => void) {
    reqwest({
        url: '/teams',
        method: 'post',
        data: toSend,
        error: () => {
            successCallback({
                success: false
            })
        },
        success: successCallback
    });
}
开发者ID:anstarovoyt,项目名称:dmmquest,代码行数:13,代码来源:Dispatcher.ts

示例3: saveAnswers

export function saveAnswers(toSend: AnswersUpdateRequest, successCallback: (res: AnswersUpdateResponse) => void) {
    reqwest({
        url: '/save',
        method: 'post',
        data: toSend,
        error: () => {
            successCallback({
                success: false
            })
        },
        success: successCallback
    });
}
开发者ID:anstarovoyt,项目名称:dmmquest,代码行数:13,代码来源:Dispatcher.ts

示例4: loadQuestions

export function loadQuestions(toSend: QuestTextsRequest, successCallback: (res: QuestTextsResponse) => void) {
    reqwest({
        url: '/quest-texts',
        method: 'post',
        data: toSend,
        error: () => {
            successCallback({
                success: false
            })
        },
        success: successCallback
    })
}
开发者ID:anstarovoyt,项目名称:dmmquest,代码行数:13,代码来源:Dispatcher.ts

示例5: unlockLastStage

export function unlockLastStage(toSend: UnlockLastCompletedStageRequest, successCallback: (res: UnlockLastCompletedStageResponse) => void) {
    reqwest({
        url: '/unlock-stage',
        method: 'post',
        data: toSend,
        error: () => {
            successCallback({
                success: false
            })
        },
        success: successCallback
    });
}
开发者ID:anstarovoyt,项目名称:dmmquest,代码行数:13,代码来源:Dispatcher.ts

示例6: getAWSSign

export function getAWSSign(toSend: GetAWSSignRequest, successCallback: (res: GetAWSSignResponse) => void) {
    reqwest({
        url: '/sign_s3',
        method: 'post',
        data: toSend,
        error: () => {
            successCallback({
                success: false
            })
        },
        success: successCallback
    });
}
开发者ID:anstarovoyt,项目名称:dmmquest,代码行数:13,代码来源:Dispatcher.ts

示例7: authRequest

export function authRequest(toSend: LoginRequest, callback: (info: LoginInfo) => void) {
    reqwest({
        url: '/login',
        method: 'post',
        data: toSend,
        error: () => {
            callback({
                authenticated: false
            })
        },
        success: callback
    });
}
开发者ID:anstarovoyt,项目名称:dmmquest,代码行数:13,代码来源:Dispatcher.ts

示例8: getRestTime

export function getRestTime(toSend: GetRestTimeRequest, successCallback: (res: GetRestTimeResponse) => void) {
    reqwest({
        url: '/rest-time',
        method: 'post',
        data: toSend,
        error: () => {
            successCallback({
                success: false
            })
        },
        success: successCallback
    });
}
开发者ID:anstarovoyt,项目名称:dmmquest,代码行数:13,代码来源:Dispatcher.ts

示例9: removeTeam

export function removeTeam(toSend: RemoveTeamRequest, successCallback: (res: RemoveTeamResponse) => void) {
    reqwest({
        url: '/remove-team',
        method: 'post',
        error: () => {
            successCallback({
                success: false
            })
        },
        data: toSend,
        success: successCallback
    });
}
开发者ID:anstarovoyt,项目名称:dmmquest,代码行数:13,代码来源:Dispatcher.ts

示例10: complete

export function complete(toSend: AnswersUpdateRequest, successCallback: (res: CompleteStageResponse) => void) {
    reqwest({
        url: '/complete',
        method: 'post',
        data: toSend,
        error: () => {
            successCallback({
                error: true,
                success: false
            })
        },
        success: successCallback
    });
}
开发者ID:anstarovoyt,项目名称:dmmquest,代码行数:14,代码来源:Dispatcher.ts


注:本文中的reqwest.default函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。