June 07, 2015 Re: Simple http client Dlang library | ||||
---|---|---|---|---|
| ||||
Posted in reply to kryszczyniak Attachments:
| On 7 June 2015 at 15:18, kryszczyniak via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote: > On Sunday, 7 June 2015 at 05:29:30 UTC, ketmar wrote: > >> On Sat, 06 Jun 2015 22:20:19 +0000, kryszczyniak wrote: >> >> Hello! >>> >>> I've created AllUCanGET, a very simple D2 http client library which you could use instead of std.net.curl module to make http connections. >>> >>> You can find the library with more information here: <a href="http://allucanget.diaboli.pl/">http://allucanget.diaboli.pl/</a>. >>> >> >> nice work, but... no sources? that means no win64 support, no gdc support, no ldc support, no freebsd support too, i believe... >> > > For now, no sources. The author is the last person who wants to use the app ;) I'm D beginner. I'll publish sources when I clean them first. > The good thing about releasing source is that people will clean them for you! (If there's interest) |
June 07, 2015 Re: Simple http client Dlang library | ||||
---|---|---|---|---|
| ||||
Posted in reply to kryszczyniak | On Sunday, 7 June 2015 at 13:17:01 UTC, kryszczyniak wrote:
> On Sunday, 7 June 2015 at 06:43:25 UTC, Ilya Yaroshenko wrote:
>>> Этот сайт не принимает визиты россиян.
>>> This site does not accept visits of Russians. Ta strona nie akceptuje odwiedzin Rosjan.
>>
>> So, I have 5 nationalities (including Polish).
>> And many Russians have Polish nationality too (but they don't know about it).
>> You hate my country. Hmm... IT IS SO FUNNY =)
>
> Getting angry of somebody is NOT my purpose. This was a residue of my youthful rebelion against everything. I didn't know this script is still on my site. I had to spend an hour to find those lines and remove them from the stats engine script and I'm realy sorry about this incident.
OK, I am sorry too.
|
August 11, 2015 Re: Simple http client Dlang library | ||||
---|---|---|---|---|
| ||||
Posted in reply to kryszczyniak | On Saturday, 6 June 2015 at 22:20:20 UTC, kryszczyniak wrote: > I've created AllUCanGET I quickly looked at usage of library, for me seems you have no experience in API design. Look: 1. auto httpclient=new AllUCanGET; - here you could pass URL as a parameter for constructor (what is in most cases more than enough) 2. httpclient.referer="http://allucanget.diaboli.pl"; - why you "hardcoded" headers as a properties of httpclient? How many of 'em you support? What about X-* headers? It's bad solution, such things better to keep in 'dictionary' (array with string indexes). 3. httpclient.postdata="postfield1=value1&postfield2=value2"; - Manual escaping for data? Serious? 4. httpclient.allucanget(); - WHAT?! :)))))) Is THAT 'allucanget' a name to make request??? 5. writeln(httpclient.response["header"]); - here one more error, opposite to error you did with headers: THIS 'header' element should be done as a property, since HTTP _always_ has header+body! Nobody needs that 'response', people needs data. I recommend you to delete this approach and rethink how people should use your 'helper'. |
Copyright © 1999-2021 by the D Language Foundation