當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。