Skip to content

Commit

Permalink
fix(android): handle null http headers and params (#6370)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Mar 7, 2023
1 parent a461a49 commit e486672
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ public static String readStreamAsString(InputStream in) throws IOException {
*/
public static JSObject request(PluginCall call, String httpMethod) throws IOException, URISyntaxException, JSONException {
String urlString = call.getString("url", "");
JSObject headers = call.getObject("headers");
JSObject params = call.getObject("params");
JSObject headers = call.getObject("headers", new JSObject());
JSObject params = call.getObject("params", new JSObject());
Integer connectTimeout = call.getInt("connectTimeout");
Integer readTimeout = call.getInt("readTimeout");
Boolean disableRedirects = call.getBoolean("disableRedirects");
Expand Down

0 comments on commit e486672

Please sign in to comment.