reqwest
reqwest copied to clipboard
how can i get response head
how can i get the response head
i don't know
Hi @gx191179173, @qq292,
after quick reading through the souces: It should be
resp.getResponseHeader
Bit better example looks like this:
reqwest({ url: 'path/to/json' , type: 'json' , method: 'post' , error: function (err) { } , success: function (resp) { // resp.getResponseHeader // just print resp console.log(resp); } })
After console.log(resp) you will see in the output what's inside the response. Then you can simply select the data needed for your usecase.
Hope this helps :) Happy Codin' ! ~Jan-Stefan