Tabnine Logo
ResourceParameter.determineRequestCharset
Code IndexAdd Tabnine to your IDE (free)

How to use
determineRequestCharset
method
in
ca.uhn.fhir.rest.server.method.ResourceParameter

Best Java code snippets using ca.uhn.fhir.rest.server.method.ResourceParameter.determineRequestCharset (Showing top 7 results out of 315)

origin: jamesagnew/hapi-fhir

@Override
protected byte[] getByteStreamRequestContents() {
  return StringUtils.defaultString(myResourceString, "")
      .getBytes(ResourceParameter.determineRequestCharset(this));
}
origin: jamesagnew/hapi-fhir

public static Reader createRequestReader(RequestDetails theRequest) {
  return createRequestReader(theRequest, determineRequestCharset(theRequest));
}
origin: jamesagnew/hapi-fhir

@Override
public boolean incomingRequestPostProcessed(RequestDetails theRequestDetails, HttpServletRequest theRequest, HttpServletResponse theResponse) throws AuthenticationException {
  EncodingEnum encoding = RestfulServerUtils.determineRequestEncodingNoDefault(theRequestDetails);
  if (encoding == null) {
    ourLog.trace("Incoming request does not appear to be FHIR, not going to validate");
    return true;
  }
  Charset charset = ResourceParameter.determineRequestCharset(theRequestDetails);
  String requestText = new String(theRequestDetails.loadRequestContents(), charset);
  if (isBlank(requestText)) {
    ourLog.trace("Incoming request does not have a body");
    return true;
  }
  ValidationResult validationResult = validate(requestText, theRequestDetails);
  // The JPA server will use this
  theRequestDetails.getUserData().put(REQUEST_VALIDATION_RESULT, validationResult);
  return true;
}
origin: jamesagnew/hapi-fhir

FhirContext ctx = theRequest.getServer().getFhirContext();
final Charset charset = determineRequestCharset(theRequest);
Reader requestReader = createRequestReader(theRequest, charset);
origin: ca.uhn.hapi.fhir/hapi-fhir-server

public static Reader createRequestReader(RequestDetails theRequest) {
  return createRequestReader(theRequest, determineRequestCharset(theRequest));
}
origin: ca.uhn.hapi.fhir/hapi-fhir-server

@Override
public boolean incomingRequestPostProcessed(RequestDetails theRequestDetails, HttpServletRequest theRequest, HttpServletResponse theResponse) throws AuthenticationException {
  EncodingEnum encoding = RestfulServerUtils.determineRequestEncodingNoDefault(theRequestDetails);
  if (encoding == null) {
    ourLog.trace("Incoming request does not appear to be FHIR, not going to validate");
    return true;
  }
  Charset charset = ResourceParameter.determineRequestCharset(theRequestDetails);
  String requestText = new String(theRequestDetails.loadRequestContents(), charset);
  if (isBlank(requestText)) {
    ourLog.trace("Incoming request does not have a body");
    return true;
  }
  ValidationResult validationResult = validate(requestText, theRequestDetails);
  // The JPA server will use this
  theRequestDetails.getUserData().put(REQUEST_VALIDATION_RESULT, validationResult);
  return true;
}
origin: ca.uhn.hapi.fhir/hapi-fhir-server

FhirContext ctx = theRequest.getServer().getFhirContext();
final Charset charset = determineRequestCharset(theRequest);
Reader requestReader = createRequestReader(theRequest, charset);
ca.uhn.fhir.rest.server.methodResourceParameterdetermineRequestCharset

Popular methods of ResourceParameter

  • <init>
  • createRequestReader
  • getMode
  • getResourceType
  • loadResourceFromRequest
  • parseResourceFromRequest

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Path (java.nio.file)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now