Thanks for chipping in Sven - Iâd asked Ben for some help as Iâd seen him on discord - that solution does indeed work. See: http://dpaste.com/218RW5G <http://dpaste.com/218RW5G> (which isnât bad - not sure about he red boxes around things, but the smalltalk highlighting is quite good (pygments I think), although there is another one that exercism use - whose name evades me). This same example doesnât work on Stfx - I get a 400 error, which I assumed was size, although 2k should give you a decent chunk of text - but I guess showing a package of code or a stack trace does blow through that. Hence my investigation of other tools like dPaste, pastebin and paste.ee. As a related question - how would I know to use #addPart: vs: #formAt: ? As our questions indicated - formAt: works for most things until you hit fields with $; in them (which I was suprised wasnât just encoded when sent in the form). The docs at dPaste are quite minimal - http://dpaste.com/api/v2/ <http://dpaste.com/api/v2/> which is why I didnât think of multi-part, so what would guide me down that route? Tim
On 17 May 2019, at 09:39, Sven Van Caekenberghe <sven@stfx.eu> wrote:
Tim,
On 17 May 2019, at 03:04, Tim Mackinnon <tim@testit.works> wrote:
I was trying to automate posting some values to a website (I would use Stfx.eu but it doesnât do syntax highlighting and only seems to work for quite small amounts).
Hmm, it does highlighting (but it is far from perfect).
There is indeed a limit to the upload size, 2048 bytes.
I answered Ben for the same problem, I believe, the solution being
http://ws.stfx.eu/QZTOS3HQAAPS
Regards,
Sven
Anyway the following code always seems to trim values that have a ; in them - and Iâm wondering if Iâm missing something - or if its the endpoint that has an issue (although curl seems to work fine).
content := 'hello world; hello'. ZnClient new systemPolicy; beOneShot; url: 'http://dpaste.com/api/v2/'; formAt: 'title' put: 'my; title'; formAt: 'syntax' put: 'smalltalk'; formAt: 'expiry_days' put: '5'; formAt: 'content' put: content; post.
Tim