You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this belongs in Typhoeus or Ethon, but Typhoeus used to support HTTP PURGE which is used by HTTP caches like Varnish to signal that entries should be removed.
The error I get now is: uninitialized constant Ethon::Easy::Http::Purge.
If I add this, the request works (it just copies Ethon::Easy::Http::Get):
moduleEthonclassEasymoduleHttp# This class knows everything about making GET requests.classPurgeincludeEthon::Easy::Http::ActionableincludeEthon::Easy::Http::Postable# Setup easy to make a GET request.## @example Setup.# get.set_params(easy)## @param [ Easy ] easy The easy to setup.defsetup(easy)supereasy.customrequest="GET"unlessform.empty?endendendendend
But maybe there's a way to allow for custom HTTP verbs?
The text was updated successfully, but these errors were encountered:
I agree there should be a way to do a custom request. Not sure though how to do it...
Your implementation looks fine except for one line:
easy.customrequest="GET"unlessform.empty?
which should be
easy.customrequest="PURGE"
Your purge would actually do a GET and shouldn't work.
I imagine a custom request to work like that:
Typhoeus::Request.new("www.example.com",method: 'purge')#=> Ethon cannot find a class and uses Ethon::Easy::Http::Custom which would look quite similar to yours.
I'm not sure if this belongs in Typhoeus or Ethon, but Typhoeus used to support HTTP PURGE which is used by HTTP caches like Varnish to signal that entries should be removed.
The error I get now is:
uninitialized constant Ethon::Easy::Http::Purge
.If I add this, the request works (it just copies Ethon::Easy::Http::Get):
But maybe there's a way to allow for custom HTTP verbs?
The text was updated successfully, but these errors were encountered: