Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add POST requests #9

Open
ziorufus opened this issue Jan 9, 2017 · 2 comments
Open

Add POST requests #9

ziorufus opened this issue Jan 9, 2017 · 2 comments
Assignees

Comments

@ziorufus
Copy link
Member

ziorufus commented Jan 9, 2017

Tint server does not work with POST requests.

@ziorufus ziorufus self-assigned this Jan 9, 2017
@iiegn
Copy link

iiegn commented Feb 17, 2017

related: also, it only works with the data/text payload as request parameter. i haven't dug into the details but i had problems with large files.

my quick solution was two-fold: commul/tint@836f7e4

  • expect the text as payload in the request body
  • use the Content-Length as indicator when the data has been read completely

i think, it would be nice to - in absence of a text= request parameter - expect the payload in the request body.

about the Content-Length: maybe using it is unnecessary. this depends on the /exact/ behaviour of the InputStream... my understanding would be that waiting for '-1' aka EOF should be enough (and that's what is being done in your original implementation). but: with a long enough request the data might come in blocks, and whether the InputStream blocks until all data has been received or it only blocks until one block has been received (and it would be necessary to drain the buffer and request the rest...) i don't know - i wanted to be sure...

@ziorufus
Copy link
Member Author

What about this? 5053d51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants