Post data to json api using flutter

I’m working on a flutter project and I want to add data to json api using this code : save() async { try{ var sendString = { ‘userId’: userId, ‘userEmail’: userEmail, }; final response = await http.post( Uri.parse(‘http://localhost:5000/createapp&#8217;), headers: <String, String>{ "ContentType": ‘application/json; charset=UTF-8’, "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Credentials": "true", "Access-Control-Allow-Headers": "Origin,Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,locale", "Access-Control-Allow-Methods": "POST, OPTIONS", }, body:… Read More Post data to json api using flutter

How can I add an IP address in a AWS CLI with out exporting

I am running below command to ingress in was-cli, it is working fine if I provide IP address, but I want it to know IP and pass it. I was trying something like below but it is not helping aws ec2 authorize-security-group-ingress –group-id sg-123456778 –protocol tcp –port 22 –cidr echo "$(curl https://checkip.amazonaws.com)/32" –profile xyzzy If… Read More How can I add an IP address in a AWS CLI with out exporting

Using cloudformation condition to create Root volume if development enviornment is choosen

I am trying to create a root volume is production env. is chosen from parameters, which works fine, but if dev is chosen, it throws an error. "Value of property BlockDeviceMappings must be of type List" Parameters: Enviornment: Type: String Description: Enter the enviornment where you want the instance deployed AllowedValues: – Production – Development… Read More Using cloudformation condition to create Root volume if development enviornment is choosen

NO_PUBKEY AA8E81B4331F7F50 NO_PUBKEY 112695A0E562B32A

I have issue with debian 9.13 apt-key when i try to update the apt package it show this error message: # sudo apt update Err:2 http://security.debian.org/debian-security stretch/updates InRelease The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY AA8E81B4331F7F50 NO_PUBKEY 112695A0E562B32A Ign:3 http://ftp.us.debian.org/debian stretch InRelease Hit:4 http://ftp.us.debian.org/debian stretch-updates InRelease Hit:5 http://ftp.us.debian.org/debian&hellip; Read More NO_PUBKEY AA8E81B4331F7F50 NO_PUBKEY 112695A0E562B32A

how show response of text view after clicking a button

I am trying to show response on screen using text view after clicking a button but getting error saying com.android.volley.toolbox.JsonObjectRequest cannot be cast to java.lang.CharSequence package com.example.volleydemo; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.JsonObjectRequest; import com.android.volley.toolbox.Volley; import org.json.JSONException; import org.json.JSONObject;… Read More how show response of text view after clicking a button