Commit 9292c479 authored by jan.koester's avatar jan.koester
Browse files

print const

parent 644d99cc
Loading
Loading
Loading
Loading
+2 −3
Changes for src/http.cpp: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ bool libhttppp::HttpUrl::operator<(const HttpUrl& other) const {
    return _path < other._path;
}

const std::string & libhttppp::HttpUrl::print(){
const std::string & libhttppp::HttpUrl::print() const{
  std::stringstream ss;
  if(_protocol==HTTP){
    ss << "http://";
@@ -136,8 +136,7 @@ const std::string & libhttppp::HttpUrl::print(){
    ss << "https://";
  }
  ss << _host << ":" << _port << _path;
  _print=ss.str();
  return _print;
  return ss.str();
}


+1 −2
Changes for src/http.h: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -69,14 +69,13 @@ namespace libhttppp {

     void clear();

     const std::string &print();
     const std::string print() const;

  private:
      int            _protocol;
      std::string _host;
      int             _port;
      std::string _path;
      std::string _print;
  };

  class HttpClient{