Posts

How to Prepare a multipart body of a response in Sprint Boot

Image
use PartEvent for Reactive Stack To stream multipart data sequentially, you can provide multipart content through PartEvent objects. Form fields can be created via FormPartEvent::create. File uploads can be created via FilePartEvent::create. You can concatenate the streams returned from methods via Flux::concat, and create a request for the WebClient. For instance, this sample will POST a multipart form containing a form field and a file. return Flux.concat( FormPartEvent.creat  

How to Prepare the body of a multipart request in Sprint Boot

Image
Prepare the body of a multipart request, resulting in a MultiValueMap<String, HttpEntity>. Parts may be concrete values or via asynchronous types such as Reactor Mono, Flux, and others registered in the ReactiveAdapterRegistry. This builder is intended for use with the reactive WebClient. For multipart requests with the RestTemplate, simply create and populate a MultiValueMap<String, HttpEntity> as shown in the Javadoc for FormHttpMessageConverter and in the reference docs. use MultipartBodyB  

How to Create Custom Environment Variable for Your Android App via generated BuildConfig.java from build.gradle

Image
I am building an android app which has an open ad unit. It is suggested to use test ad unit id during developing stage. Hence I hard coded the test ad unit id in my code to debug the open app ad. When the app is ready to release, I have to replace the ad unit id to the real one registered on AdMob. Um. Is there a way to generate the ad unit id during build time? For debug build, it will be assigned with the test ad unit id, the real ad unit id will be replaced release build. By doing so, the cod  

How to render a web page in your React Native apps?

Image
use React Native Webview I haven't wrote react native apps for years. Recently I start work on react native again. just learned: React Native WebView is a modern, well-supported, and cross-platform WebView for React Native. It is intended to be a replacement for the built-in WebView (which will be removed from core). GitHub - react-native-webview/react-native-webview: React Native Cross-Platform WebViewReact Native Cross-Platform WebView. Contribute to react-native-webview/react-native-webvie