I wanted to creat an httpClient which gets png ima...
# ktor
c
I wanted to creat an httpClient which gets png images bur when I set the content type it throws: Header Content-Type is controlled by the engine, any idea?
s
Why do you want to set the content type of the request body if you want to
GET
an image ?
c
indeed I need to set the accept one right?
s
I dont think so. Pretty sure most servers will send you without an accept header.
e
Hi @coder82, you can set
ContentType
for outgoing content. Consider using
Accept
header for your requests: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept