question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for "-G" curl option

See original GitHub issue

In Stripe APIs the filtering can be done by sending parameters with “-G” curl option, as example https://stripe.com/docs/api/accounts/list#list_accounts-created

curl https://api.stripe.com/v1/accounts?limit=3 \
   -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
   -d created[lte]=1517443200 \
   -G 

When used, this option will make all data specified with -d, --data, --data-binary or --data-urlencode to be used in an HTTP GET request instead of the POST request that otherwise would be used. The data will be appended to the URL with a ‘?’ separator. From https://curl.haxx.se/docs/manpage.html

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
JakeWhartoncommented, Nov 15, 2019

I don’t really understand how this is useful over @Query-annotated parameters. Can you please provide an example of what you are trying to achieve that is impossible with @Query and @QueryMap?

0reactions
Montdeskacommented, Jun 9, 2020

Has been almost a year now, but for someone looking for the same than @raderio, maybe this will help. With the Jake’s comment, I just looked for annotation @Query, and as an example:

@GET("Route") Observable<RoutesResponse> getRoutes(@Query("where") String query, @HeaderMap Map<String, String> headers);

I had a POJO for that query but It doesn’t work with @Query as it gives me a 500 Internal Server Error, and I just, convert it to a String with gson:

restClient.getRoutes(getGson().toJson(request), headers); // getGson() is in the RequestModel

Read more comments on GitHub >

github_iconTop Results From Across the Web

curl.1 the man page
curl is a tool for transferring data from or to a server. It supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP,...
Read more >
curl man page
curl is a tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, GOPHER,...
Read more >
List of `curl` options - gists · GitHub
List of `curl` options. GitHub Gist: instantly share code, notes, and snippets.
Read more >
Supported cURL options
Option Parameter Notes ‑‑ciphers ‑‑connect‑timeout Specify a decimal number of seconds. ‑‑cookie ‑b or <$fmvari... See table note 3.
Read more >
Curl Command In Linux Explained + Examples How To Use It
The curl command supports numerous protocols for data transfer to and from a server. This tutorial shows you how to use curl and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found