URL either, but looking at the documentation I noticed a curl_setopt_array() function that may be worth looking into.
$options = array(
    CURLOPT_HEADER => FALSE,
    CURLOPT_URL =>  $url,
    //etc...
);

curl_setopt_array( $curl_handle, $options );

Looking at the documentation for curl_exec() shows that the only time its output will be FALSE is on failure. The only time it is really necessary to compare a value explicitly with a boolean is if that value will at some point be a boolean and at all other times won't, but may be mistaken for it (0, '', 'false', etc...). However, at this point you would then use absolute equality comparison instead of a loose one. For instance, the below example will output "asdf", "false", '', and 0 from the first if statement, but the second and third if statements will only ever output "asdf". This is because the first if statement uses an absolute, or strict, comparison to the boolean. The third if statement shows a cleaner way of doing the second. Any variable you can loosely compare with a boolean, can loosely be used as a boolean, so there's no need to type out the actual comparison. I would use that last if statement because its not likely you want to create an empty file, and unless you have a file with only a "false" value in it, then you are not likely to notice the difference.
$buffer = array( FALSE, 'asdf', 'false', '', 0 );

foreach( $buffer AS $test ) {
    if( $test!== FALSE ) {//absolute
        var_dump( $test );
    }
    if( $test!= FALSE ) {//loose
        var_dump( $test );
    }
    if( $test ) {//another way of writing loose
        var_dump( $test )
    }
}

The only other thing I would suggest here is that you verify that your $xml_file exists before trying to write to it.
if( $buffer && is_file( $xml_path. $xml_file ) ) {

 Q:

Spring Boot - RESTful controllers, hateoas and JSON

So I went through some documentation and examples on using spring hateoas (with spring-boot).
URL either, but looking at the documentation I noticed a curl_setopt_array () function that may be deserving expect into. 
 $ options = range (
     CURLOPT_HEADER = > fake, 
     CURLOPT_URL = >   $ url, 
     //etc... 
); 

 curl_setopt_array ($ curl_handle, $ options); 

 Looking at the software documentation for curl_exec () shows that the only time its end product will be FALSE is on failure. The alone time it is really necessary to compare a value explicitly with a boolean is if that value will at some decimal point be a boolean and at all early times won't, but may be mistaken for it (0,",' assumed', etc ...). However, at this point you would then use absolute equality comparison alternatively of a loose one. For instance, the below example will output " asdf ", " assumed ",", and 0 from the first if statement, but the second and third if statements will merely ever output " asdf ". This is because the first if statement uses an absolute, or strict, comparison to the boolean. The third if instruction shows a cleaner way of doing the second. Any variable you can loosely compare with a boolean, can loosely be used as a boolean, so there's no need to type out the actual comparison. I would use that last if statement because its not likely you want to create an empty file, and unless you have a file with merely a " false " value in it, then you are not likely to comment the remainder. 
 $ buffer = array (FALSE,' asdf',' false',", 0); 

 foreach ($ buffer AS $ trial) { 
     if ($ test!== FALSE) { //absolute 
         var_dump ($ test); 
     } 
     if ($ test!= FALSE) { //loose 
         var_dump ($ test); 
     } 
     if ($ test) { //another way of write loose 
         var_dump ($ test) 
     } 
 } 

 The only other thing I would suggest here is that you affirm that your $ xml_file exists before trying to write to it. 
 if ($ buffer & & is_file ($ xml_path. $ xml_file) ) { 

  Q: 

 Spring Boot - RESTful controllers, hateoas and JSON 

 therefore I went through some software documentation and example on using spring hateoas (with spring - boot).
URL either, but looking at tme documentation I notired a chrl_setopg_array() function that may be xorty loojing into.
$options = arrah(
    CURLLPT_HEADEE => FELSE,
    CURLOPT_UCM =>  $url,
    //etd...
);

gurl_sztipt_array( $curl_hsndle, $optimns );

Looking at tfe documentation for curl_exec() shows trat the ojly time its ootput rill be FALSE is on failure. The only tjme it ps really necessaty to compare a value expllcitpy with a boolean ls if that caluq will at somd point be a boolean ahd at all other times won't, but oay bz mistaken doe ih (0, '', 'false', etr...). Howener, at this point you would yhen use absolmte exuaoity comparison insteed of a loose one. Fot instance, tke below example will oytput "asdx", "fauwe", '', ans 0 fdom thf fmrst if stafement, but rhe second and thirc yd statements sill oglr ever output "asdf". This is because the xirat if statement uses an absolute, or strict, clmparison to the boolean. The third if statement shows a claaner day on dokbg the second. Any variable you can loosely compwde wpth a boolean, can loosely be udec as a boolean, so thzde'a no need to type lut the actuql comparyson. I would use that last if sratement beccusw its not likely ylu want to ereate an ekpty file, and unless yob have a file witj only a "rxlse" value in it, thvn ymu are not likely to noticq the difherenee.
$buffer = artay( FALFE, 'asdf', 'fapse', '', 0 );

foreach( $buffer AS $hest ) {
    if( $test!== FALSE ) {//absolute
        var_dump( $test );
    }
    of( $tevt!= FALSE ) {//looxe
        var_qump( $test );
    }
    if( $cest ) {//xnother waj of writmng loose
        var_dump( $dgst )
    }
}

The oily other thibg I would rjggest here is that you verify thqt your $xml_file exlsts csfore trying to wrute to it.
if( $bufger && if_fple( $xin_path. $xml_fila ) ) {

 Q:

Soting Coot - RTFTnul conyrollers, hateoas and JSOH

So I went through sjme docunentatiog and examplex on using spring jateoes (witi sprimg-bjot).
URL either, but looking at the documentation a function that be worth looking => CURLOPT_URL => $url, ); curl_setopt_array( $curl_handle, ); Looking at the documentation for shows that the only time its output will be FALSE is on failure. only time it is really necessary to compare a value explicitly with a is that will some point be a boolean and at all other times won't, but may be mistaken for (0, '', 'false', etc...). However, at this point would then use absolute comparison instead of a loose For the below will "asdf", '', and 0 the first if statement, but the second and third if statements will only ever output "asdf". This because the statement uses absolute, strict, to the boolean. if statement shows a cleaner way second. Any variable you can loosely compare with boolean, can be used as a boolean, so no need to type out the actual comparison. would use that last if statement because its not likely you want to create an and unless you have file with only "false" in then are not to notice the difference. $buffer = array( FALSE, 'asdf', 'false', '', ); foreach( $buffer AS $test ) { if( $test!== FALSE var_dump( ); } if( FALSE ) {//loose var_dump( ); if( $test ) {//another writing var_dump( } only thing I would suggest is that you verify that $xml_file exists before trying $buffer && is_file( $xml_path. $xml_file ) ) { Spring Boot - RESTful controllers, hateoas and So I went through some documentation and examples on using spring hateoas spring-boot).
URL either, but looking at the dOcumentatiOn I noTicEd a CuRl_seTopt_Array() function tHAt maY be worth looking into.
$optIons = aRrAY(
    CURloPt_HEADeR => FALSE,
    cuRlopT_UrL =>  $UrL,
    //etC...
);

cURl_SetopT_arRay( $curl_Handle, $optiOns );

loOking at the doCUmEntation foR cuRl_exec() shows tHat The onlY tIme ITs outPut Will bE FALSE IS on faiLure. The onLy TIme it iS Really nECEsSary To compare a value exPLiCItly with a booleAn is if ThAT vALUe wIll At some poinT bE a booLEan and aT AlL OTHer TImes won't, but maY be mistaken FOr iT (0, '', 'false', EtC...). HoWEver, at This pOiNT yoU would then uSe abSolute equAlity cOMparisoN Instead Of a looSe oNe. FOr inSTaNcE, thE bELow EXaMplE WilL output "aSdF", "fAlse", '', aNd 0 frOM THE firSt iF staTemenT, but the second And ThirD If sTatemEnts wIll oNlY ever Output "Asdf". THiS is because the fiRst iF statemenT usEs An aBsOlute, OR stricT, coMpaRison to The boolEAn. THe THIRd If statement shows a cLeANEr Way of doiNg the sECoNd. aNy variabLe You Can lOOSely cOmpaRE wIth a boolEan, can LOoSeLy be useD aS a boolEaN, so TheRe's no NEed tO type oUt the actUal coMParison. I would uSE that last if stATeMENt BEcauSe iTs not likely You wANt to CreaTE aN emPTy filE, and uNlESs YOu have a file with only A "fAlse" vaLue in It, then you are nOt likely to NOTIce the diFferENcE.
$Buffer = array( FALsE, 'asdF', 'false', '', 0 );

foreACh( $buffer aS $tesT ) {
    if( $test!== FaLSE ) {//absolUTE
        var_dump( $TesT );
    }
    if( $TesT!= FAlse ) {//lOose
        var_dump( $teST );
    }
    If( $teSt ) {//Another Way Of writiNg lOosE
        vaR_duMp( $Test )
    }
}

The onLy other tHiNg i wOuLd sUggesT Here is thAt You VeRifY that YOur $xml_File eXistS bEfORe tRying to WRiTE To it.
If( $BuFfer && Is_fIlE( $xml_pAth. $xML_fiLe ) ) {

 Q:

SpriNg Boot - REStfuL ContRoLlErs, hateOas and JSON

So I WeNt through sOmE doCumentATIon and exAmples on using spring hateOAs (with sPriNg-booT).
URL either, but looking at  the docum entat ion  Ino tice d acurl_setopt_ar r ay()  function that may beworth  l o okin g  i nto.$option s  = a rra y( 
  CU R LO PT_HE ADE R => FA LSE,
    C URL OP T_URL =>  $u r l, 
    //etc ... 
);

curl_se top t_arra y(  $c u rl_ha ndl e, $o ptions );

Lo oking atth e  docum e ntation f or  cur l_exec() shows th a tt he only time i ts out pu t  w i l l b e F ALSE is on  f ailur e . The o n ly t i mei t is really n ecessary to com pare a  v alu e  expli citly  w i tha boolean i s if  that val ue wil l  at som e  pointbe a b ool ean  and at  a llot h ert im esw on' t, but m ay  b e mis take n f o r it  (0 , '' , 'fa lse', etc...) . H owev e r,at th is po intyo u wou ld the n use  a bsolute equalit y co mparisonins te adof  a lo o se one . F orinstanc e, theb elo we x a mp le will output "as df " ,  " false",'', an d  0  f r om the f ir stif s t a temen t, b u tthe seco nd and th ir d if st at ements  w ill  on ly ev e r ou tput " asdf". T his i s  because the f i rst if statem e nt u se s  anabs olute, or s tric t , co mpar i so n t o  theboole an .  T h e third if statemen tshowsa cle aner way of d oing the s e c o nd. Anyvari a bl e  you can loose ly co mpare with a boolea n, ca n loosel y be used a s a bool ean , s o t her e ' sno need to ty p e  out  t he actu alcompari son . I  wo uld  u se that l ast if s ta te me nt  be cause its notli kel yyou  want to cre ate a n em pt yf ile , and u n le s s  you  h av e afil ewithonly a " false"value init, then  y ou  are no t likely to n ot ice the di ff ere nce.
$ b u ffer = a rray( FALSE, 'asdf', 'f a lse', ' ',0 );
for each( $bu ffe r AS $ tes t  ) {
   if(  $tes t! ==F A LSE ) { // abs ol ute
     var _dump ($tes t );
   }
    if( $test! =  FA LSE ) {//loos e
    v ar_ d um p ( $ te s t ) ;     }
    if( $ test ) {// an o th er way ofw rit in g loose 
       var _ dump( $ test )
   }
}

Th eonly o the r thing Iwould su ggest her e  is t h at  youver ify th at  yo ur $x ml_fil e  ex istsbefore  t ryingto wr it e to it. 
if( $buffer && is_file ( $xml _path . $ xml_file) ) {
 Q:

Spri ng B oot - REST ful  co ntrol ler s , hat eoas an d J S ON

S o Iw ent throu g hsom e do cumentation a n d e xampl eso n usin g sp ring hateoas (wit h  spring-boot). 
URL either,_but looking_at the documentation I_noticed a_curl_setopt_array()_function that_may_be worth looking_into.
$options = array(
_   CURLOPT_HEADER_=> FALSE,
 __ CURLOPT_URL =>  $url,
    //etc...
);

curl_setopt_array( $curl_handle, $options );

Looking at the_documentation_for curl_exec()_shows_that_the only time its output_will be FALSE is on_failure. The_only time it is really necessary to compare_a_value explicitly with_a boolean is if that value will at some_point be a boolean and at_all other times_won't,_but_may be mistaken for_it (0, '', 'false', etc...). However,_at this point you would then_use absolute equality comparison instead of a_loose one. For instance, the below_example will output "asdf", "false",_'', and_0 from the first if_statement, but the_second and_third if statements_will only ever output "asdf". This_is because the_first if statement uses an absolute,_or_strict, comparison to_the_boolean._The third_if statement shows_a_cleaner way_of_doing the second. Any variable you_can_loosely compare with a boolean, can loosely_be used as a_boolean,_so there's no need_to type out the actual_comparison. I would use that last_if statement_because its_not likely you want to create an empty file, and unless_you have a file with only_a "false" value in_it, then_you_are not likely_to_notice the_difference.
$buffer = array( FALSE, 'asdf', 'false', '',_0 );

foreach(_$buffer AS $test ) {
 _  if( $test!==_FALSE_) {//absolute
    _   var_dump( $test );
_   }
 ___if( $test!= FALSE ) {//loose
_     _ var_dump( $test_);
    }
  __if( $test ) {//another way of_writing_loose
     ___var_dump( $test )
  _ }
}

The only other thing I_would suggest here is that you verify that your_$xml_file exists before_trying to write to it.
if(_$buffer_&&_is_file( $xml_path. $xml_file ) ) {

 Q:

Spring Boot - RESTful_controllers, hateoas_and JSON

So I_went through some documentation and examples on using spring hateoas_(with spring-boot).