Giter Club home page Giter Club logo

examples's People

Contributors

apatrushev avatar arve0 avatar bc-m avatar bevanhunt avatar cheolgyu avatar digeratus avatar doumanash avatar dowwie avatar elliotekj avatar fafhrd91 avatar fairingrey avatar jannic avatar johntitor avatar kellytk avatar krircc avatar leizzer avatar leon3s avatar marcoziti avatar mohanson avatar mygnu avatar pfrenssen avatar psiace avatar robjtede avatar rofrol avatar sadika9 avatar sapir avatar svenstaro avatar vmalloc avatar zeljic avatar zzau13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

examples's Issues

async_pg crash with "thread 'ntex-rt:worker:0' panicked at 'there is no reactor running"

Thanks for such a great private project and it seems a little issue on example/async_pg when I followed README steps

pub async fn add_user(client: &Client, user_info: User) -> Result<User, MyError> {
        ...
        let stmt = client.prepare(&_stmt).await.unwrap();  // <-  thread 'ntex-rt:worker:0' panicked at 'there is no reactor running
        ...

here is the detail error

[2021-07-22T05:32:14Z TRACE ntex::http::h1::dispatcher] http message is received: 
    Request HTTP/1.1 POST:/user
      headers:
        "host": "localhost:8080"
        "user-agent": "HTTPie/2.4.0"
        "connection": "keep-alive"
        "accept": "application/json, */*;q=0.5"
        "content-type": "application/json"
        "content-length": "126"
        "accept-encoding": "gzip, deflate"
     and payload Payload(PayloadDecoder { kind: Cell { value: Length(126) } })
[2021-07-22T05:32:14Z TRACE ntex::http::h1::decoder] Length read: 126
thread 'ntex-rt:worker:0' panicked at 'there is no reactor running, must be called from the context of a Tokio 0.2.x runtime', /Users/orlowang/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.25/src/io/driver/mod.rs:203:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Unable to access X.509 client certificates

Before the most recent version change, it was possible to access the underlying transport, and extract the X.509 client certificates from it.

Now, there is is Io<Sealed> type, which is also used by the IoBoxed type (which is being used by the Mqtt implementation). However, there seems to be no way to get access to the certificates.

The way to acquire them differs between rustls and openssl, so previously we had a trait to abstract this, and added the trait to all requirements of the Io type parameter.

I guess the new way would be to implement a Filter::query method to retrieve the certificates. And the TlsServerFilter should provide an implementation which returns them.

Example for returning a list of objects as JSON

Is there an example of what would be the NTEX equivalent of the following express.js code:

app.get('/names', (req, res) => {
    names = ['John', 'Jack', 'James'];
    res.setHeader('Content-Type', 'application/json')
    res.send(JSON.stringify(names))
})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.