| 239 | } |
| 240 | |
| 241 | async POST( |
| 242 | path: ValidPath, |
| 243 | options: FileArg & RequestInit & RequestOptions = {}, |
| 244 | ): Promise<Response> { |
| 245 | const { slug, params, url } = this.generateRequestParts(path) |
| 246 | const queryParams = generateQueryString({}, params) |
| 247 | const request = new Request(`${url}${queryParams}`, { |
| 248 | ...options, |
| 249 | headers: this.buildHeaders(options), |
| 250 | method: 'POST', |
| 251 | }) |
| 252 | return this._POST(request, { params: Promise.resolve({ slug }) }) |
| 253 | } |
| 254 | |
| 255 | async PUT(path: ValidPath, options: FileArg & RequestInit & RequestOptions): Promise<Response> { |
| 256 | const { slug, params, url } = this.generateRequestParts(path) |