Hello anybody know about `fuel http client` ? I d...
# announcements
d
Hello anybody know about
fuel http client
? I dont know why fuel http header set the value as array of string instead of normal string for example
{Origin=[abc], Content-Type=[application/json]
instead of
{Origin=abc, Content-Type=application/json
is there any method to overide it to not use array of string?
g
#C0B8GAGR0
if it bothers you and you know you wont have duplicated, maybe create an extesnion method with that wraps in the value in listOf<String>(v) ?
d
@sitepodmatt is there any sample code how can I change the behaviour of
listOf
?
and how can I inject the extension function into fuel library ?
g
You cannot inject extension function to third party code
I’m not familiar with fuel, but what exactly wrong with array of strings instead of string? I believe it just supports multiple values separated with
;
and you cannot change this behavior
but you can write some simple wrapper as Matt suggested
d
Copy code
I’m not familiar with fuel, but what exactly wrong with array of strings instead of string? I believe it just supports multiple values separated with `;` and you cannot change this behavior
because the host http server cannot accept header value as array
g
because the host http server cannot accept header value as array
But how does resulting header in the request looks like? Your example above is just a header representation in code, server cannot accept header in this format too:
{Origin=abc, Content-Type=application/json}
, header is just a string, not even 2 strings