Answer the question
In order to leave comments, you need to log in
How to defeat urlencoded body on post request via HTTParty?
Good day.
There is a server on which from time to time it is required to post some information (I will make a reservation right away - not spam).
You can do this through the browser - on the page there is a regular form for a post, or you can automate it in some way.
There is a code:
class Poster
include HTTParty
....
def post_comment(text)
resp = self.class.post('/posting.fcgi',
:body => {
:comment => text})
end
...
end
@p = Poster.new
@p.post_comment('Est tut kto jivoy?')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question