Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Lightweight interface to cast votes?

by LanX (Saint)
on Nov 04, 2017 at 23:16 UTC ( [id://1202769]=note: print w/replies, xml ) Need Help??


in reply to Lightweight interface to cast votes?

FWIW, here a found a partial solution ...

Adding a parameter displaytype with the value xml to the vote request/form will result in returning an xml instead of HTML.

For instance

<node id="1202729" title="regex replace a string" created="2017-11-03 +19:37:29" updated="2017-11-03 19:37:29"> <type id="115">perlquestion</type> <author id="1139608">OldChamp</author> <data> <field name="doctext"> <p> In a text file there are constant string1, for example Event "?" f +ollowed by some text and then a string2, which is spacebspace- or spa +cewspace-.</p> <p> I want to replace string1 with Event "Black to move" or Event "Whi +te to move" dependant on srting2.</p> </field> <field name="reputation">-2</field> </data> </node>

Load wise it's still not optimal, because the raw content of the root post is still returned in field doctext but it's OK for an XML-HTTP-request.

One can also vote on posts of the subtree, but the resulting reputation is not included, and needs to be gathered separately.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1202769]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-19 18:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found