如何使用http put方法asynctask更新值

时间:2015-06-01 09:52:06

标签: android android-asynctask

我是Android新手,我正在尝试更新这些值,它应该是POST方法。我知道只有GET和POST方法,任何人都可以指导我将其转换为PUT方法。现在它在JSONObject json = new JSONObject(); json.put("Id", "15"); json.put("LId", EnId); json.put("Name",assetname); json.put("Des",Description1); HttpClient httpclient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(URL); jsonObj = json.toString(); httpPost.setEntity(new StringEntity(jsonObj)); httpPost.setHeader("Accept", "application/json"); httpPost.setHeader("Content-type", "application/json"); HttpResponse httpResponse = httpclient.execute(httpPost); int statusCode = httpResponse.getStatusLine().getStatusCode(); 方法

alter proc spfilmcriteria(@Minlength as int,@maxlength as int, @title as varchar(max))
as
begin
select filmname,filmruntimeminutes
from tblFilm
where filmruntimeminutes >= @Minlength and filmruntimeminutes<= @maxlength and FilmName like  '%' + @title + '%'
order by filmruntimeminutes asc
end

0 个答案:

没有答案