Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static constexpr std::array kTextMIMETypePrefixes{
namespace {

struct InitStreamResult {
int httpStatusCode;
uint32_t httpStatusCode;
Headers headers;
std::shared_ptr<Stream> stream;
};
Expand Down Expand Up @@ -113,7 +113,7 @@ class Stream : public NetworkRequestListener,
processPending();
}

void onHeaders(int httpStatusCode, const Headers& headers) override {
void onHeaders(uint32_t httpStatusCode, const Headers& headers) override {
// Find content-type through case-insensitive search of headers.
for (const auto& [name, value] : headers) {
std::string lowerName = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct ReadStreamParams {
struct NetworkResource {
bool success{};
std::optional<std::string> stream;
std::optional<int> httpStatusCode;
std::optional<uint32_t> httpStatusCode;
std::optional<std::string> netErrorName;
std::optional<Headers> headers;
folly::dynamic toDynamic() const {
Expand Down Expand Up @@ -111,7 +111,7 @@ class NetworkRequestListener {
* \param httpStatusCode The HTTP status code received.
* \param headers Response headers as an unordered_map.
*/
virtual void onHeaders(int httpStatusCode, const Headers& headers) = 0;
virtual void onHeaders(uint32_t httpStatusCode, const Headers& headers) = 0;

/**
* To be called by the delegate on receipt of data chunks.
Expand Down