its NOT DUPLICATE.Link that has been provided is an OLD one."http client" has been removed in api23
I want to send json object:
{"emailId":"ashish.bhatt@mobimedia.in","address":"Naya bans","city":"Noida","pincode":"201301","account_number":"91123546374208","bank_name":"Axis Bank","branch_name":"91123546374208","ifsc_code":"UTI0000879"}
to url:
http://10digimr.mobimedia.in/api/mobile_retailer/update_profile How do i do it? via post method?
METHOD:
POST /api/mobile_retailer/update_profile
MANDATORY KEY:
{"emailId","address"}
REQUEST JSON:
{"emailId":"ashish.bhatt@mobimedia.in","address":"Naya bans","city":"Noida","pincode":"201301","account_number":"91123546374208","bank_name":"Axis Bank","branch_name":"91123546374208","ifsc_code":"UTI0000879"}
RESPONSE:
{"message":"Mail Send","data":true,"status":200}
Define a class
AsyncT
and call it inonCreate
method using:Class definition:
@Sandip Subedi This is how you get response from the httpURLConnection