21 Commits

Author SHA1 Message Date
Marcin Kulik
12a0ef780f Revert "Gzip data for upload"
This reverts commit f54b0a9793.
gzip.NewReader constructs a decompressor, and we need compressor here.
2016-02-13 10:48:42 +01:00
Ben Tranter
f54b0a9793 Gzip data for upload
Relevant issue: #121

This tiny PR gzips the body of the POST request before uploading it,
and adds the appropriate `Accept-Encoding` header to the request. As
far as I can tell, no change needs to be made on the Rails end, since
`Net:HTTP` knows to automatically decompress gzipped requests if they
contain the `Accept-Encoding: gzip` header.

I tested this by compiling locally and uploading a session
([![asciicast](https://asciinema.org/a/5a4ro8drmyekusbrzbrt3n5ur.png)](https://asciinema.org/a/5a4ro8drmyekusbrzbrt3n5ur)) and it seemed to work.
2016-02-11 20:56:38 -05:00
Marcin Kulik
c6d1561837 Remove unused argument 2015-05-02 10:09:26 +02:00
Marcin Kulik
365b36cd17 Words 2015-04-16 13:19:02 +02:00
Marcin Kulik
e5a69405b2 Handle 401 2015-04-16 13:17:09 +02:00
Marcin Kulik
ec6d893405 Handle 400 status from API 2015-03-23 17:48:25 +01:00
Marcin Kulik
88fc47dae0 Generating of auth URL is api.API's responsibility 2015-03-12 12:50:25 +01:00
Marcin Kulik
fa3b4cd8fa Access process env only from entrypoint 2015-03-11 12:07:26 +01:00
Marcin Kulik
ba50ce0ee4 Break UploadAsciicast into multiple smaller methods 2015-03-09 12:47:00 +01:00
Marcin Kulik
ca19aa280d Display any warnings sent by the API to the user
This gives the API the ability to inform the user about client version
deprecation and other client-side and server-side issues.
2015-03-09 12:18:15 +01:00
Marcin Kulik
4d07cedb36 Handle status 422 2015-03-02 20:31:51 +01:00
Marcin Kulik
e66903b2bf Handle status 413 2015-03-02 20:16:41 +01:00
Marcin Kulik
f44198691c New asciicast file format, ability to save asciicasts locally 2015-02-24 16:28:11 +01:00
Marcin Kulik
41d1d71ab6 Implement golint suggestions 2014-11-15 13:33:20 +01:00
Marcin Kulik
f667b1efe2 Handle non-200 status from remote API 2014-11-13 20:46:00 +01:00
Marcin Kulik
8a86274437 Naming, improved. 2014-11-13 20:46:00 +01:00
Marcin Kulik
bda02179dc Send proper version number in User-Agent 2014-11-13 20:46:00 +01:00
Marcin Kulik
7a398efca4 Send proper User-Agent header when creating asciicast 2014-11-13 20:45:59 +01:00
Marcin Kulik
ece5221bbd Implement asciicast upload 2014-11-13 20:45:59 +01:00
Marcin Kulik
9591c79a0d Fix rec command builder 2014-11-13 20:45:59 +01:00
Marcin Kulik
5ad639629f Add rec command 2014-11-13 20:45:58 +01:00