Database pool working
This commit is contained in:
@ -3,6 +3,8 @@ use crate::usimp;
|
||||
use crate::websocket;
|
||||
use chrono;
|
||||
use json;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::borrow::Borrow;
|
||||
|
||||
pub struct HttpStream {
|
||||
pub stream: super::Stream,
|
||||
@ -157,7 +159,7 @@ fn endpoint_handler(
|
||||
let output = usimp::endpoint(endpoint, input);
|
||||
|
||||
// TODO compress
|
||||
let buf = output.to_string() + "\r\n";
|
||||
let buf = json::stringify(output) + "\r\n";
|
||||
let length = buf.as_bytes().len();
|
||||
res.add_header("Content-Length", length.to_string().as_str());
|
||||
res.add_header("Content-Type", "application/json; charset=utf-8");
|
||||
|
Reference in New Issue
Block a user