Re: [racket-users] Safely using port->string where nothing has been written to the port

2017-01-24 Thread Sean Kemplay
Hi David, Indeed it does!! Thanks for your help. Sean On Monday, January 23, 2017 at 7:16:58 PM UTC, David K. Storrs wrote: > Hi Sean, > > Does (byte-ready?) work for your case? > > https://docs.racket-lang.org/reference/Byte_and_String_Input.html?q=peek#%28def._%28%28quote._~23~25kernel%29._b

Re: [racket-users] Safely using port->string where nothing has been written to the port

2017-01-23 Thread David Storrs
Hi Sean, Does (byte-ready?) work for your case? https://docs.racket-lang.org/reference/Byte_and_String_Input.html?q=peek#%28def._%28%28quote._~23~25kernel%29._byte-ready~3f%29%29 On Mon, Jan 23, 2017 at 6:05 AM, Sean Kemplay wrote: > Hello, > > I am using the URL library to interact with a RES

[racket-users] Safely using port->string where nothing has been written to the port

2017-01-23 Thread Sean Kemplay
Hello, I am using the URL library to interact with a REST API. One of the Endpoints sends returns no content for a POST request with a status code of 204 (a little unusual however it is an external API so we have to cater to it). I can check the status code for 204 and only apply string->port