roonie007 / axiod

Promise based HTTP client for Deno
53 stars 6 forks source link

Consider URLSearchParams #12

Closed Maximilian5189 closed 3 years ago

Maximilian5189 commented 3 years ago

Hi,

at the moment FormData is supported as body, and is handed to fetch without modification (mod.ts:78).

How about doing the same for URLSearchParams? In fetch both types are treated differently, e.g. for URLSearchParams the content-type header is set to application/x-www-form-urlencoded;charset=UTF-8, whereas FormData is treated as multipart/form-data. So in my opinion it would make sense to consider these scenarios in axiod as well. What do you think?

roonie007 commented 3 years ago

Hey @Maximilian5189

Can you create PR for this ?

Maximilian5189 commented 3 years ago

Yes, just created the PR.

roonie007 commented 3 years ago

Thanks, it's merged and available in 0.23