Commit Graph

2565 Commits

Author SHA1 Message Date
Jonathan Bernard
68d3486f5a Bugfix for times.initInterval (issue #4889)
`initInterval` had logic to calculate and carry overflowed fields (65 seconds
turns into 5 seconds and carries 1 minute). However, we were not including that
carried value when we recalculate the carry over for the next period of time.So
if you had, for example, 3600 seconds, we carried 60 minutes into the minutes
calculation, but when we calculated how much we should carry into the hours
value we only considered what the user originally supplied for the minutes
field, and forgot to include those 60 carried minute.

So, for example, with the previous implementation this was true:

`seconds(60 * 60 * 24) == seconds(0)`

Or, as failing tests:

```nimrod
import times

assert seconds(60 * 60 * 24) != seconds(0)
assert seconds(60 * 60 * 24) == days(1)
```
2016-10-12 15:44:21 -05:00
Alpha Shuro
72b15678a1 Add example for posting json content
i struggled to figure out how to post json content with nim's http client. this is a fundamental capability in many web apps, we don't always need to send data as multipart form data (e.g. when communicating via json apis) so frankly i'm surprised it isn't part of the "post" and "postContent" procs
2016-10-12 13:58:34 +02:00
Andreas Rumpf
f46168d654 Merge pull request #4828 from jfhg/unify_waitpid_handling
Unify waitpid handling
2016-10-09 19:03:12 +02:00
Araq
80ad3d3441 fixes #4844 2016-10-08 10:47:47 +02:00
Dominik Picheta
c24d6fe17e Fixes pesky hint in asyncfutures. 2016-10-01 00:09:17 +02:00
Araq
77677c73c8 made test green for 32bit system 2016-09-30 22:14:29 +02:00
Araq
6c022f4500 made test green for 32bit system 2016-09-30 22:14:29 +02:00
Johannes Hofmann
52db21bb2c convert exitStatus to exit code 2016-09-30 10:19:57 +02:00
Johannes Hofmann
72ee6f78c5 Merge branch 'devel' into unify_waitpid_handling 2016-09-30 08:37:09 +02:00
Federico Ceratto
5e4708ef3b Add few JSON examples 2016-09-29 15:56:22 +01:00
Andreas Rumpf
21e35c201c made async compile again 2016-09-26 23:31:36 +02:00
Andreas Rumpf
0699305121 revert brainless changes 2016-09-26 23:23:47 +02:00
Andreas Rumpf
cfae650750 make travis green 2016-09-26 23:19:09 +02:00
Andreas Rumpf
8e845cc79f docgen fixes for basic3d 2016-09-26 19:26:39 +02:00
Andreas Rumpf
0ca58120b7 docgen fixes for selectors.nim 2016-09-26 19:26:39 +02:00
Andreas Rumpf
1ccdf85eda docgen fixes for basic2d 2016-09-26 19:26:39 +02:00
Dominik Picheta
df44c71770 Fixes #4587. 2016-09-25 19:26:28 +02:00
Dominik Picheta
6aa8ff9af6 Moves async futures into asyncfutures module. 2016-09-25 18:24:35 +02:00
Dominik Picheta
927fce4c7f FutureVar[T] parameters are now completed automatically. 2016-09-25 16:05:22 +02:00
Dominik Picheta
b3c620fc58 Merge branch 'asyncftp-add-removeDir' of https://github.com/pyloor/Nim into pyloor-asyncftp-add-removeDir 2016-09-25 13:11:02 +02:00
Dominik Picheta
1f1ec69fc9 Merge branch 'asyncftp-add-removeFile' of https://github.com/pyloor/Nim into pyloor-asyncftp-add-removeFile 2016-09-25 13:09:32 +02:00
Dominik Picheta
8a6343b5b6 Fixes #3847. 2016-09-25 13:02:10 +02:00
Dominik Picheta
9753fb064f Add PATCH HTTP Method. 2016-09-25 11:48:10 +02:00
Johannes Hofmann
1dccbaf9a0 another attempt at properly declaring the status variable 2016-09-25 10:16:14 +02:00
Johannes Hofmann
14f72bcbac make status variable local 2016-09-25 09:51:23 +02:00
Dominik Picheta
26c7a76c8a asynchttpserver's Response object's req method uses HttpMethod now.
Fixes #4423.
2016-09-25 00:39:57 +02:00
Dominik Picheta
6a83bc1ff5 HTTP client's request proc no longer slices http method string param. 2016-09-25 00:10:07 +02:00
Dominik Picheta
545e24b8ff Improves httpclient documentation. 2016-09-24 23:02:56 +02:00
Dominik Picheta
cff6ec2155 Implements onProgressChanged callback for httpclient. 2016-09-24 22:58:10 +02:00
Dominik Picheta
ff821eed6a Deprecates old httpclient procedures. 2016-09-24 20:48:28 +02:00
Dominik Picheta
0baef8e6ea Implements getContent and postContent for (Async)HttpClient. 2016-09-24 20:33:00 +02:00
Dominik Picheta
fa9ec7a6b5 Handle redirects in HttpClient's post procs & post test. 2016-09-24 17:50:58 +02:00
Johannes Hofmann
77109d4c7b Merge branch 'devel' into unify_waitpid_handling 2016-09-24 14:54:32 +02:00
Johannes Hofmann
829b706440 rename exitCode to exitStatus 2016-09-24 14:46:07 +02:00
Dominik Picheta
aec88bb5d9 Merge pull request #4815 from pyloor/asyncftp-add-rename
Asyncftpclient: adding rename proc
2016-09-24 10:48:32 +02:00
cheatfate
f40c1d3ad1 Add support for kqueue's EVFILT_VNODE (filesystem monitoring), and add test for it. 2016-09-24 05:16:39 +03:00
Andrea Ferretti
4ee4393556 Fixed missing comma 2016-09-22 11:54:59 +02:00
Johannes Hofmann
5986b78bbe generally update exitCode only after successful completion of waitpid() 2016-09-22 10:55:21 +02:00
pyloor
bc19b71fd2 Asyncftpclient: adding removeDir proc 2016-09-21 23:58:07 +02:00
pyloor
95e0e6260e adding a test for removing a file 2016-09-21 23:54:38 +02:00
pyloor
cd41479180 adding removeFile proc to asyncftpclient 2016-09-21 23:49:40 +02:00
pyloor
348c7d1faf adding rename proc to asyncftpclient 2016-09-21 23:46:15 +02:00
Andrea Ferretti
91f6784d0f Added PATCH HTTP method 2016-09-21 17:27:05 +02:00
Dominik Picheta
09651bec5e HttpCode shouldn't require explicit initialisation to prevent breakage. 2016-09-19 21:53:07 +02:00
Dominik Picheta
31bdf45ffe Reverted removal of HttpCode.$. 2016-09-19 21:16:50 +02:00
Dominik Picheta
519aa16b67 Fixes asyncmacro compilation in tests. 2016-09-19 21:00:54 +02:00
Dominik Picheta
cfd187d16e Use distinct range for HttpCode as suggested by @nigredo-tori. 2016-09-19 20:58:27 +02:00
Dominik Picheta
1fb5dd2477 Fixes #4797. 2016-09-19 19:36:35 +02:00
Dominik Picheta
8386476592 Implements proxy support for (Async)HttpClient. Ref #4423.
Fixes #2160.
2016-09-18 22:59:12 +02:00
Dominik Picheta
0c99523ad3 Implements timeouts for synchronous HttpClient. 2016-09-18 19:08:12 +02:00