-
Notifications
You must be signed in to change notification settings - Fork 8
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
request is not parsed correctly #3
Comments
@lorypelli In the earlier versions, error handling and returns were not implemented in order to quickly identify errors. However, based on your feedback, I have added error handling and returns in version v0.9.0 instead of causing panics. The error handling may not be comprehensive enough yet. If you encounter any issues, please feel free to provide feedback. Thank you for your suggestion. |
thanks, now it gives an error in
this is from Copy as cURL (cmd) option on chrome, same if I try with bash option |
@lorypelli Supports copying as cURL command only (Bash), I let me check and fix it. |
@lorypelli The v0.9.1 version has already addressed this issue. If you are still encountering problems, please provide the Bash command with the curl string. I can fix it, but currently, support is limited to curl commands in Bash format only; other formats are not supported at this time. |
You should give error saying only bash is supported and not windows |
The v0.10.0 version has already Add Parse, ParseBash, ParseCmd to make them compatible with the cmd format. |
Thanks a lot, this is the best support I received in an issue, good...😉🙂 |
err
for bad parsing
I changed the title to better understand what the issue is for other people |
still doesn't work |
it gives a parse error now |
the alert is from an app I'm making using also your package |
tried both with cmd and bash |
@lorypelli |
So, I'm using wrong method, I use |
|
@lorypelli you try it v0.10.0 |
I'm using latest version |
scurl := `curl 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap' \
-H 'sec-ch-ua: "Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"' \
-H 'Referer: https://github.com/474420502/gcurl/issues/3' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"'`
cu, err := Parse(scurl)
if err != nil {
log.Panic(err)
}
resp, err := cu.Temporary().Execute()
if err != nil {
log.Panic(err)
}
log.Println(resp.ContentString()) |
https://github.com/lorypelli/FetchTTP/blob/main/app.go#L336-L372 |
@lorypelli I think this will help |
it adds http protocol twice, either if the url is http or https |
and URL is not correctly parsed |
ah, it's the same error as before |
@lorypelli The problem may stem from inadequate support for Windows. I'll consider enhancing support for Windows at a later date; I don't have the time this month. |
@lorypelli Try version v0.11.0, but since I currently don't have access to a Windows system, I'm unable to test your specific scenario. I can only make some attempts based on what's possible. |
I'm finding issues with your libraries, a lot of time parsing doesn't work and you should return an error which is usually done in go, please do this, it's a good practice to have
The text was updated successfully, but these errors were encountered: