Comments (1)
可以选择在拦截器中添加 withCredentials,或者是class级别 @DefaultHeaders(headers: Object)、方法级别@Header(key: string)添加。
@Cacheable({ pool: 'articles' })
@GET('article')
fetchArticles(@Query('pageIndex') pageIndex = 1,
@Query('pageSize') pageSize = 10,
@Header('withCredentials') withCredentials: boolean,
@Query('keyword') keyword?: string): Observable<SearchResult<Article>> {
return null;
}
或者:
@Injectable()
@DefaultHeaders({
withCredentials: true
})
export class OnlineArticleService extends RebirthHttp implements IArticleService {
}
from rebirth-http.
Related Issues (14)
- Cannot find type definition file for 'core-js'. HOT 1
- In which case will get null? HOT 1
- Fails to work in production mode HOT 1
- How to support two api baseUrl? HOT 1
- About the rebirthHttpProvider·s action scope HOT 3
- 不支持附件下载请求,结果为二进制附件 HOT 1
- "the request was rejected because no multipart boundary was found" HOT 1
- rebirth-http Roadmap 2020 Summer HOT 1
- TypeError: Cannot read property 'indexOf' of null HOT 2
- Why not support patch method? HOT 3
- Query don't support empty character string HOT 3
- 您好,问个问题 HOT 10
- @Query 装饰器声明的对象有问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rebirth-http.