angular-cn/public/docs/js/latest/api/http/BaseRequestOptions-class.jade

41 lines
923 B
Plaintext

p.location-badge.
exported from <a href='../http'>angular2/http</a>
defined in <a href="https://github.com/angular/angular/tree/3a0410a/modules/angular2/src/http/base_request_options.ts#L54-L77">angular2/src/http/base_request_options.ts (line 54)</a>
:markdown
Injectable version of <a href='RequestOptions-class.html'><code>RequestOptions</code></a>.
#Example
```
import {Http, BaseRequestOptions, Request} from 'angular2/http';
...
class MyComponent {
constructor(baseRequestOptions:BaseRequestOptions, http:Http) {
var options = baseRequestOptions.merge({body: 'foobar'});
var request = new Request('https://foo', options);
http.request(request).subscribe(res => this.bars = res.json());
}
}
```
.l-main-section
h2 Members
.l-sub-section
h3 constructor
pre.prettyprint
code.
constructor()
:markdown