-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HttpMessage is now extended by instead of nested in HttpRequest and H…
…ttpResponse
- Loading branch information
1 parent
f6262d4
commit 3c1652a
Showing
5 changed files
with
20 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
package ai.diffy.proxy; | ||
|
||
import io.netty.handler.codec.http.HttpHeaders; | ||
|
||
import java.util.Map; | ||
|
||
public class HttpResponse { | ||
public class HttpResponse extends HttpMessage { | ||
private final String status; | ||
private final HttpMessage message; | ||
|
||
public HttpResponse(String status, HttpMessage message) { | ||
public HttpResponse(String status, HttpHeaders headers, String body) { | ||
super(headers, body); | ||
this.status = status; | ||
this.message = message; | ||
} | ||
|
||
public String getStatus() { | ||
return status; | ||
} | ||
|
||
public HttpMessage getMessage() { | ||
return message; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "\nstatus = "+ status+"\n"+"message =\n"+ message+"\n"; | ||
return "\nstatus = "+ status+"\n"+"message =\n"+ super.toString()+"\n"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters