Creates a Request from this template. The template must be resolved before calling this method, or an IllegalStateException will be thrown. @return a new Request instance. @throws IllegalStateException if this template has not been resolved.
()
| 285 | * @throws IllegalStateException if this template has not been resolved. |
| 286 | */ |
| 287 | public Request request() { |
| 288 | if (!this.resolved) { |
| 289 | throw new IllegalStateException("template has not been resolved."); |
| 290 | } |
| 291 | return Request.create(this.method, this.url(), this.headers(), this.body, this); |
| 292 | } |
| 293 | |
| 294 | /** |
| 295 | * Set the Http Method. |