HandlerHTTP.cpp
uint8_t HandlerHTTP::checkIsSuccess(){
  Serial.println(F("Start send"));
  setEspiredTime(DELAY_FOR_HTTP);
  while(modem->available() < 20 && delayEspired > 0){
    delay(50);
  }
  if(delayEspired == 0) return NO_SEND;// suspend
  delay(50);
  uint8_t size = modem->available();
  char answ[size+1];
  for(uint8_t i = 0; i < size; i++)answ[i]=modem->read();
  answ[size] = '\0';
  char pattern[] = { '2','0','0' };
 // Serial.print(F(" Get server answer : "));
  Serial.println(answ);
  modem->dropGSM();
  return strstr(answ, pattern)== NULL;
}
/*
* return 0 if return code == 200
*/
return 0 if return code == 200
return 0 if return code == 200
uint8_t HandlerHTTP::checkIsSuccess(){
  Serial.println(F("Start send"));
  setEspiredTime(DELAY_FOR_HTTP);
  while(modem->available() < 20 && delayEspired > 0){
    delay(50);
  }
  if(delayEspired == 0) return NO_SEND;
  delay(50);
  uint8_t size = modem->available();
  char answ[size+1];
  for(uint8_t i = 0; i < size; i++)answ[i]=modem->read();
  answ[size] = '\0';
  char pattern[] = { '2','0','0' };
  Serial.println(answ);
  modem->dropGSM();
  return strstr(answ, pattern)== NULL;
}
uint8_t HandlerHTTP :: checkIsSuccess ( ) { Serial . println ( F ( " " ) ) ; setEspiredTime ( DELAY_FOR_HTTP ) ; while ( modem -> available ( ) < 20 && delayEspired > 0 ) { delay ( 50 ) ; } if ( delayEspired == 0 ) return NO_SEND ; delay ( 50 ) ; uint8_t size = modem -> available ( ) ; char answ [ size + 1 ] ; for ( uint8_t i = 0 ; i < size ; i ++ ) answ [ i ] = modem -> read ( ) ; answ [ size ] = ' \0 ' ; char pattern [ ] = { ' ' , ' ' , ' ' } ; Serial . println ( answ ) ; modem -> dropGSM ( ) ; return strstr ( answ , pattern ) == NULL ; }
return 0 if return code == 200
return 0 if return code == 200
// suspend // Serial.print(F(" Get server answer : "));