本文整理汇总了TypeScript中base/fetch.fetchClient.get方法的典型用法代码示例。如果您正苦于以下问题:TypeScript fetchClient.get方法的具体用法?TypeScript fetchClient.get怎么用?TypeScript fetchClient.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base/fetch.fetchClient
的用法示例。
在下文中一共展示了fetchClient.get方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getLinks
export function getLinks() {
return fetchClient.get('/links/?format=json')
}
示例2: getCommentList
export function getCommentList(article: string) {
return fetchClient.get(`/comment/comments/${article}/?format=json`)
}
示例3: getHeadSubComments
export function getHeadSubComments(head: string) {
return fetchClient.get(`/comment/subcomments/${head}/?format=json`)
}
示例4: getAllComments
export function getAllComments() {
return fetchClient.get('/comments/?format=json')
}
示例5: getUserSubComments
export function getUserSubComments(user: string) {
return fetchClient.get(`/comment/subcomments/${user}/?format=json`)
}
示例6: getList
export function getList(category: string, page: number = 1) {
return fetchClient.get(`/article/articles/${category}/?format=json&page=${page}`)
}
示例7: getCategories
export function getCategories() {
return fetchClient.get('/article/categories/?format=json')
}
示例8: getDetail
export function getDetail(url: string) {
return fetchClient.get(`/article/${url}/?format=json`)
}