51 lines
1.1 KiB
Plaintext
51 lines
1.1 KiB
Plaintext
|
|
p.location-badge.
|
|
exported from <a href='../http'>angular2/http</a>
|
|
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/http/base_request_options.ts#L62-L87">angular2/src/http/base_request_options.ts (line 62)</a>
|
|
|
|
:markdown
|
|
Injectable version of <a href='RequestOptions-class.html'><code>RequestOptions</code></a>, with overridable default values.
|
|
|
|
#Example
|
|
|
|
```
|
|
import {Http, BaseRequestOptions, Request} from 'angular2/http';
|
|
...
|
|
class MyComponent {
|
|
constructor(baseRequestOptions:BaseRequestOptions, http:Http) {
|
|
var options = baseRequestOptions.merge({body: 'foobar', url: 'https://foo'});
|
|
var request = new Request(options);
|
|
http.request(request).subscribe(res => this.bars = res.json());
|
|
}
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
.l-main-section
|
|
h2 Annotations
|
|
.l-sub-section
|
|
h3.annotation Injectable
|
|
pre.prettyprint
|
|
code.
|
|
@Injectable()
|
|
|
|
|
|
.l-main-section
|
|
h2 Members
|
|
.l-sub-section
|
|
h3 constructor
|
|
|
|
|
|
pre.prettyprint
|
|
code.
|
|
constructor()
|
|
|
|
:markdown
|
|
|
|
|
|
|
|
|
|
|