Android Open Source - RESTExplorer R E S T Request Record






From Project

Back to project page RESTExplorer.

License

The source code is released under:

MIT License

If you think the Android project RESTExplorer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.cmn397.restexplorer;
// ww w .j  ava  2  s  .c o m
import android.net.Uri;

public class RESTRequestRecord {
  private String  mURL,
          mResource,
          mParams,
          mDescription;

  public String getURL() {
    return this.mURL;
  }
  public void setURL(String uRL) {
    this.mURL = uRL;
  }

  public String getResource() {
    return this.mResource;
  }
  public void setResource(String resource) {
    this.mResource = resource;
  }

  public String getParams() {
    return this.mParams;
  }
  public void setParams(String params) {
    this.mParams = params;
  }

  public void setDescription(String desc) {
    this.mDescription = desc;
  }
  public String getDescription() {
    return this.mDescription;
  }

  public String buildRequestURI() {
    String raw = getURL();
    String resource = getResource();
    if (!resource.equals(""))
      raw = raw + "/" + resource;
    String params = getParams();
    if (params != "")
      raw = raw + "?" + getParams();

    Uri.Builder b = Uri.parse(raw).buildUpon();
    String res = b.build().toString();
    return res;
  }
}




Java Source Code List

com.cmn397.restexplorer.ChooseRequestFragment.java
com.cmn397.restexplorer.MainActivity.java
com.cmn397.restexplorer.RESTAsyncClient.java
com.cmn397.restexplorer.RESTRequestRecord.java
com.cmn397.restexplorer.RESTResponseRecord.java
com.cmn397.restexplorer.RequestDetailFragment.java
com.cmn397.restexplorer.ResponseTypeHandler.java
com.cmn397.restexplorer.ResultFragment.java
com.cmn397.restexplorer.ServerDBOpenHelper.java