![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Using this gem is probably a very bad idea in at least 98% of the cases I can think of. Think of a it as a HTTP client that doesn't care about the response and doesn't care about basically anything besides sending its payload to a server. An alternative name for this client is "scumbag-HTTP-client".
So, unless you are really sure you want to use this lib, you're probably better off looking at the hundreds other Ruby HTTP libraries.
Add this line to your application's Gemfile:
gem 'fire-and-forget', :require => 'fire/forget'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fire-and-forget
FAF.post "http://example.com", {:foo => 'bar'}, {"X-Custom" => true}
In the example above, the request will be sent as a JSON request and the
body (a Ruby hash) will be converted to json if to_json
is available on
the object (otherwise to_s
will be used).
FAF.post "http://example.com", "{\"language\": {\"created_at\": \"2010/11/23 19:47:05 +0000\",\"updated_at\": \"2010/11/23 19:47:05 +0000\",\"active\": true, \"code\": \"en\", \"id\":37}}"
Would send the request passing the JSON string as the body, strings aren't converted when passed as the request body.
Sometimes, you might want to debug the response or potentially slow down the application code. You can pass a block to do that:
FAF.post "http://example.com", {:foo => 'bar'} do |socket|
sleep(0.02)
end
or
FAF.post "http://example.com", {:foo => 'bar'} do |socket|
while output = socket.gets
print output
end
end
This will not "forget" about the response, but instead wait for data to come down the socket so we can print.
Currently, FAF only supports basic options, no authentication unless you pass all the details via the headers.
Once the request is sent, the socket is closed which might or might not please the server receiving the request (you might want to use a block/sleep to slow down the closing of the socket if your proxy/cache doesn't like that FAF closes the connection right away.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that fire-and-forget demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.