Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a PUT request in ION library

I am using Ion library and i should say that is awesome. but i cannot find a documentation for creating PUT , DELETE , GET request? if it can handle this REST Request can you guide me ?

like image 241
Navid_pdp11 Avatar asked Jan 18 '15 11:01

Navid_pdp11


2 Answers

Use the .load(METHOD, URL) call to specify an HTTP verb.

like image 94
koush Avatar answered Nov 17 '22 08:11

koush


PUT Request

void PutRequest(String URL)
{
    Ion.with(mContext)
            .load("PUT",URL)
            .setBodyParameter("name","foo")
            .asString();

}

it may help you. Check this url also https://github.com/koush/ion

like image 2
CLIFFORD P Y Avatar answered Nov 17 '22 08:11

CLIFFORD P Y