All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.gwtrpcplus.client.util.RequestHelper Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package com.googlecode.gwtrpcplus.client.util;

import com.google.gwt.http.client.Header;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.Response;

public class RequestHelper {
	public static void process(RequestCallback requestCallback, final String result){
		Request req=new Request(){};
		Response res=new Response() {
			@Override
			public String getText() {
				return result;
			}
			@Override
			public String getStatusText() {
				return null;
			}
			
			@Override
			public int getStatusCode() {
				return Response.SC_OK;
			}
			
			@Override
			public String getHeadersAsString() {
				return null;
			}
			
			@Override
			public Header[] getHeaders() {
				return null;
			}
			
			@Override
			public String getHeader(String header) {
				return null;
			}
		};
		requestCallback.onResponseReceived(req, res);
	}
	
	
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy