Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query params are not returned after parsing CURL #1

Open
hhovakimyan opened this issue Dec 21, 2022 · 0 comments
Open

Query params are not returned after parsing CURL #1

hhovakimyan opened this issue Dec 21, 2022 · 0 comments

Comments

@hhovakimyan
Copy link

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": {} }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant