| 15 | }); |
| 16 | |
| 17 | function toHttpMethod(method: HttpMethod): FIRHTTPMethod { |
| 18 | switch (method) { |
| 19 | case HttpMethod.CONNECT: |
| 20 | return FIRHTTPMethod.CONNECT; |
| 21 | case HttpMethod.DELETE: |
| 22 | return FIRHTTPMethod.DELETE; |
| 23 | case HttpMethod.GET: |
| 24 | return FIRHTTPMethod.GET; |
| 25 | case HttpMethod.HEAD: |
| 26 | return FIRHTTPMethod.HEAD; |
| 27 | case HttpMethod.OPTIONS: |
| 28 | return FIRHTTPMethod.OPTIONS; |
| 29 | case HttpMethod.PATCH: |
| 30 | return FIRHTTPMethod.PATCH; |
| 31 | case HttpMethod.POST: |
| 32 | return FIRHTTPMethod.POST; |
| 33 | case HttpMethod.PUT: |
| 34 | return FIRHTTPMethod.PUT; |
| 35 | case HttpMethod.TRACE: |
| 36 | return FIRHTTPMethod.TRACE; |
| 37 | } |
| 38 | } |
| 39 | export class HttpMetric implements IHttpMetric { |
| 40 | _native: FIRHTTPMetric; |
| 41 | static fromUrlMethod(url: string, method: HttpMethod) { |