(query: HttpRequestDraft['query'])
| 31 | } |
| 32 | |
| 33 | function buildQueryString(query: HttpRequestDraft['query']): string { |
| 34 | return query |
| 35 | .filter(entry => entry.enabled !== false && entry.key) |
| 36 | .map(entry => `${entry.key}=${entry.value}`) |
| 37 | .join('&') |
| 38 | } |
| 39 | |
| 40 | function buildPreviewUrl(draft: HttpRequestDraft): string { |
| 41 | const queryString = buildQueryString(draft.query) |