Srinivas Sampath added the comment:
if you look at my code, couple of lines below the print, i am actually
doing the send over the socket. It took me awhile to figure out why the
socket is failing. I understand that the byte array is represented with a
'b' infront as part of encode function b
SilentGhost added the comment:
Your request is likely failing for entirely different reasons.
What you've done is encoded a str object into bytes object, which is
represented with as literal using b prefix. It isn't being sent over the socket.
--
nosy: +SilentGhost
resolution: -> no
New submission from Srinivas Sampath :
I am trying to run the attached code. when hard-coding the string in the URL
and doing .encode, then the code works. However since i am requesting user
input, i cannot hard-code and the code seem to add the 'b' character in the
beginning causing the re