Fix spelling of Verson; add withers

This commit is contained in:
2023-04-12 11:20:46 -05:00
parent 106976a060
commit cbf84fd76b

View File

@ -36,7 +36,7 @@ import org.apache.http.util.EntityUtils;
public class QHttpResponse
{
private Integer statusCode;
private String statusProtocolVerson;
private String statusProtocolVersion;
private String statusReasonPhrase;
private List<Header> headerList;
private String content;
@ -66,7 +66,7 @@ public class QHttpResponse
this.statusReasonPhrase = httpResponse.getStatusLine().getReasonPhrase();
if(httpResponse.getStatusLine().getProtocolVersion() != null)
{
this.statusProtocolVerson = httpResponse.getStatusLine().getProtocolVersion().toString();
this.statusProtocolVersion = httpResponse.getStatusLine().getProtocolVersion().toString();
}
}
this.content = EntityUtils.toString(httpResponse.getEntity());
@ -97,23 +97,23 @@ public class QHttpResponse
/*******************************************************************************
** Getter for statusProtocolVerson
** Getter for statusProtocolVersion
**
*******************************************************************************/
public String getStatusProtocolVerson()
public String getStatusProtocolVersion()
{
return statusProtocolVerson;
return statusProtocolVersion;
}
/*******************************************************************************
** Setter for statusProtocolVerson
** Setter for statusProtocolVersion
**
*******************************************************************************/
public void setStatusProtocolVerson(String statusProtocolVerson)
public void setStatusProtocolVersion(String statusProtocolVersion)
{
this.statusProtocolVerson = statusProtocolVerson;
this.statusProtocolVersion = statusProtocolVersion;
}
@ -194,4 +194,48 @@ public class QHttpResponse
return (this);
}
/*******************************************************************************
** Fluent setter for statusCode
*******************************************************************************/
public QHttpResponse withStatusCode(Integer statusCode)
{
this.statusCode = statusCode;
return (this);
}
/*******************************************************************************
** Fluent setter for statusProtocolVersion
*******************************************************************************/
public QHttpResponse withStatusProtocolVersion(String statusProtocolVersion)
{
this.statusProtocolVersion = statusProtocolVersion;
return (this);
}
/*******************************************************************************
** Fluent setter for statusReasonPhrase
*******************************************************************************/
public QHttpResponse withStatusReasonPhrase(String statusReasonPhrase)
{
this.statusReasonPhrase = statusReasonPhrase;
return (this);
}
/*******************************************************************************
** Fluent setter for headerList
*******************************************************************************/
public QHttpResponse withHeaderList(List<Header> headerList)
{
this.headerList = headerList;
return (this);
}
}