Skip to content

Query params are not returned after parsing CURL #1

Description

@hhovakimyan

Hi, I have installed your library for parsing CURL strings. I tried to parse this string
curl --location --request GET 'https://a.klaviyo.com/api/v2/lists?api_key=my_api_key' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1bmlxdWVfbmFtZSI6IkVsaXFzMjAyMSIsInN1YiI6IkVsaXFzMjAyMSIsInJvbGUiOiJVc2VyIiwiaXNzIjoiYXBwLmN1c3RvbWlseS5jb20iLCJhdWQiOiJhbGwiLCJleHAiOjE2NTkxMTMwODEsIm5iZiI6MTY1NjUyMTA4MX0.fsF4UHhtXhCwvMiDe0JxXEBXvsaSlsaNSAo82GM6Bgc' \ --header 'Content-Type: application/json'

And my code is
import { parseCurl as trueParseCurl } from 'curlup'; const parsed = trueParseCurl(curlString); console.log(parsed);
The query parameters of the URL were not returned in parsing result:
{ "url": "https://a.klaviyo.com/api/v2/lists?api_key=my_api_key", "method": "GET", "headers": { "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1bmlxdWVfbmFtZSI6IkVsaXFzMjAyMSIsInN1YiI6IkVsaXFzMjAyMSIsInJvbGUiOiJVc2VyIiwiaXNzIjoiYXBwLmN1c3RvbWlseS5jb20iLCJhdWQiOiJhbGwiLCJleHAiOjE2NTkxMTMwODEsIm5iZiI6MTY1NjUyMTA4MX0.fsF4UHhtXhCwvMiDe0JxXEBXvsaSlsaNSAo82GM6Bgc", "Content-Type": "application/json" }, "auth": {} }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions