c# - Send http header from wcf web service to android -
i calling wcf rest service android.suppose method calling.
public employee getemployee(int empid) { employee emp = null; using (idatareader reader = datamanager.executereaderprocedure(storedprocedures.getemployee, empid)) { while(reader.read()) { emp = new employee(); emp.id = reader.getint32(0); emp.fullname = reader.getstring(1); emp.designation = reader.getstring(2); } } return emp; }
now not able how send information in http header method. appreciated.
you can use weboperationcontext.
system.servicemodel.web.weboperationcontext.current.outgoingresponse.headers.add("cache-control", "no-cache");
edit
i have used cache-control
example here can specify valid http header. second parameter value wish set.
Comments
Post a Comment