nativescript-community / https

Secure HTTP client with SSL pinning for Nativescript - iOS/Android
https://nativescript-community.github.io/https/
Other
51 stars 42 forks source link

Discuss about the Body #58

Closed kefahB closed 4 years ago

kefahB commented 4 years ago

Hey @EddyVerbruggen

I want to ask you about the Type of the Body on this Plugin; The most common scenario to use this plugin is to migrate from Fetch or http NS Core module to your plugin; Both of them use HttpRequestOptions to implement the request, and the body it content as JSON.stringfy() .. for me migrating from NS core to nativescript-https push me to change my code, of course it is not on application side but on server side, because I use PHP on the remote side and I have implemented several logic for security use.

My question it is possible to change the typing of body toany instead of HttpsRequestObject ?

What do you think ?

EddyVerbruggen commented 4 years ago

I'm not religious about the type of the body param. As long as we can remain backward compatible with older versions of the plugin I'd be happy to merge any PR.