File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
src/main/java/io/github/jeemv/springboot/vuejs/utilities Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 66 * Http class for Http requests
77 *
88 * @author jcheron myaddressmail@gmail.com
9- * @version 1.0.5
9+ * @version 1.0.6
1010 */
1111public class Http {
1212
@@ -358,14 +358,24 @@ public static String post(String url, String successCallback) {
358358 }
359359
360360 /**
361- * Defines a request header
361+ * Defines a request header.
362362 *
363363 * @param key the header key
364364 * @param value the header value
365- * @return
365+ * @return the javascript generated
366366 */
367367 public static String setRequestHeader (String key , String value ) {
368368 return "this.$http.headers.set('" + key + "', '" + value + "');" ;
369369 }
370370
371+ /**
372+ * Adds response.data to an array.
373+ *
374+ * @param array the array to update
375+ * @return the javascript generated
376+ */
377+ public String responseToArray (String array ) {
378+ return JsArray .add (array , RESPONSE_DATA );
379+ }
380+
371381}
You can’t perform that action at this time.
0 commit comments