本文整理汇总了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
});
}
示例2: loadTeam
export function loadTeam(toSend: TeamsRequest, successCallback: (res: TeamsResponse) => void) {
reqwest({
url: '/teams',
method: 'post',
data: toSend,
error: () => {
successCallback({
success: false
})
},
success: successCallback
});
}
示例3: saveAnswers
export function saveAnswers(toSend: AnswersUpdateRequest, successCallback: (res: AnswersUpdateResponse) => void) {
reqwest({
url: '/save',
method: 'post',
data: toSend,
error: () => {
successCallback({
success: false
})
},
success: successCallback
});
}
示例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
})
}
示例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
});
}
示例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
});
}
示例7: authRequest
export function authRequest(toSend: LoginRequest, callback: (info: LoginInfo) => void) {
reqwest({
url: '/login',
method: 'post',
data: toSend,
error: () => {
callback({
authenticated: false
})
},
success: callback
});
}
示例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
});
}
示例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
});
}
示例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
});
}