erickutcher / httpdownloader

HTTP(S) download manager that uses input/output completion ports (IOCP).
https://erickutcher.github.io/#HTTP_Downloader
558 stars 62 forks source link

how to download by post content type is application/json UTF 8 #174

Closed feiyi1019 closed 3 years ago

feiyi1019 commented 3 years ago

the default content type was Content-Type header [application/x-www-form-urlencoded]

is there a way to change it into application/json ,and CHARSET utf-8?

it's useless and put "application/json "on the header

Thank you so much!

erickutcher commented 3 years ago

I'm not sure I understand. Are you able to provide an example download that uses the content type that you're describing?

If you can find some example downloads that are initiated with the application/json content type, then that would help me implement it.

feiyi1019 commented 3 years ago

url:http://101.36.1xxx9200/_search/scroll?scroll=1s post_data:{"scroll_id":"DnF1ZXJ5VGhlbkZldGNoBQAAAAAAIPHvFnZmWEhkbXdWUmxXcVhwckxjUDVSRXcAAAAAADhPYBZqWWZCNUNTOVJvS0xoTnpEZEhUTDdnAAAAAAAg8fAWdmZYSGRtd1ZSbFdxWHByTGNQNVJFdwAAAAAAOE9hFmpZZkI1Q1M5Um9LTGhOekRkSFRMN2cAAAAAACDx8RZ2ZlhIZG13VlJsV3FYcHJMY1A1UkV3"} content-type:application/json charset=UTF-8

erickutcher commented 3 years ago

I've made it so that manual POST downloads will require the use of the Content-Type header (if needed) rather than automatically setting it to application/x-www-form-urlencoded. That'll allow the use of any value including application/json.

I'll update the browser extensions to automatically supply the POST request's Content-Type as well.

feiyi1019 commented 3 years ago

great job

erickutcher commented 3 years ago

Thank you. I will more than likely be releasing a new build this weekend. It'll have the fix implemented in it.

erickutcher commented 3 years ago

I've released a new version that fixes this.

feiyi1019 commented 3 years ago

works great. thank you so much!