gentlemanhal / ring-curl Goto Github PK
View Code? Open in Web Editor NEWConverts ring requests into cURL commands
License: Eclipse Public License 1.0
Converts ring requests into cURL commands
License: Eclipse Public License 1.0
https://circleci.com/blog/january-4-2023-security-alert/
For now I've just deleted them all the the pipeline, as we haven't actually made any changes to this repo in a long time I'm not actually sure if the pipeline even still works. If it does it certainly isn't following best practices (I know this as I recently updated the Nevergreen pipeline)
honestly it might be better to just switch to using GitHub actions?
I think this is because the deploy step has built a new jar without any source.
We have a manual step between building / testing and deploying as we don't want to automatically push every commit to clojars. So we copy the built jar to the workspace and the idea was once the deploy step was triggered it would use that. This has worked correctly when creating the release on GitHub but the lein deploy step seems to have built a new jar. This new jar doesn't contain any source files as we didn't copy them to the workspace between steps!
The helper function ring-curl.clj-http/convert
does not preserve :query-params
. This is not necessarily an issue with the core library because the user can always choose their own middleware when converting from a clj-http request to a ring request. However, it might be good to fix this for general use cases.
It looks like within the ring-curl.clj-http
namespace moving wrap-query-params
to the end of the middleware
vector fixes the issue. This is because wrap-url
will wipe out the :query-string
if the :url
doesn't contain a query string segment.
See the following snippet for an example. We expect http://localhost/test?k=v
, but we get http://localhost/test
.
(ns llama.tmp
(:require [ring-curl.clj-http]
[ring-curl.core]
[clj-http.client]))
(ring-curl.core/to-curl
(ring-curl.clj-http/convert
{:url "http://localhost/test"
:query-params {"k" "v"}}))
;; => curl -v -X GET "http://localhost/test"
Can be fixed by using the following ring-curl.clj-http/middleware
:
(def middleware
[wrap-basic-auth
wrap-oauth
wrap-user-info
wrap-url
wrap-accept
wrap-accept-encoding
wrap-content-type
wrap-form-params
wrap-nested-params
wrap-method
wrap-query-params])
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.