Closed takeruadelbert closed 3 years ago
The data
variable in do_service
function will be passed directly to the urllib.request, so it accept only bytes. you should use json.dumps(payload).encode()
to change your dict to bytes.
@keijack ah I see, it works now. Thank you so much! cheers
I release a new version, 0.9.2, now dict
and str
objects will be accepted in do_service
function.
@keijack nice, really appreciate it 👍
Hi, recently I am using your library to register my python service to eureka spring cloud. However, I have a problem when I am trying to open api request to another service with json payload. Could you help me how to send data with json?
This is the code which I am using it now:
The another service which retrieving the payload data wasn't Json type throwing error
Broken Pipe
.P.S. I notice that your
data
param indo_service
method receives asdata: bytes = None