Hello folks,
To help make the best use of HTTP clients making various POST requests to external URL, I would like to know if there are pits traps and to minimize any potentional security risk/memory leak. My background in Python or Q2 ecosystem are not strong. I'm trying to brush up my skillsets in this area. I don't know exactly how well Python handles the HTTP clients OR if I should be using Q2's classes, so here goes my questions:
1. Does Q2 provide its own HTTP client through its factory/service classes? If so, what is it? Or do we simply just use https://docs.python.org/3/library/http.client.html and go from there?
2. For example, I know that in .Net Framework, we have to be careful how we initialize HTTP clients as not to exhaust connection pool or create memory leak in C#- otherwise we risk bringing down the server. Does Python share same issue here? If so, what can/should I do to minimize bringing the harm to the health of Q2 servers while creating code that makes various POST requests to external API endpoints?
3. What about handling certificate handshake? What's the preferred way of making the vendors' api endpoints trusted? I believe that we should be importing vault into the code and use that, somehow?
4. What are the preferred timeout length before HTTP client should cancel its request? Is 1 minute sufficient? What is Q2's extension timeout default behavior from client AJAX to extension's endpoint?
5. Similar to #4, does Python support some kind of TokenCancellation that would indicate that client user cancelled the browser request (or, in some case, maybe Q2 cancelled the request because the extension took too long for itself to complete?) This is to help short-circuit the backend logic in the extension code not to continue with its flow-logic to help not waste Q2's server resources or external third-party vendor API endpoints, if caller request got cancelled.
6. What are the preferred way of persisting POSTED data based on user's data for a small duration of time (within 5 seconds?) To help combat users accidentially spamming API calls to the external endpoints while refreshing page.
The nature of this question is to help me make me become more informed on how to create some HTTP POST requests to various vendors API secure endpoints retrieving user data from Q2 extensions over SSL in a safe and secure way.
Edit: I should clarify, this is about backend logic in python making external requests to various API endpoints on behalf of a user (requester.)
Hello folks,
To help make the best use of HTTP clients making various POST requests to external URL, I would like to know if there are pits traps and to minimize any potentional security risk/memory leak. My background in Python or Q2 ecosystem are not strong. I'm trying to brush up my skillsets in this area. I don't know exactly how well Python handles the HTTP clients OR if I should be using Q2's classes, so here goes my questions:
1. Does Q2 provide its own HTTP client through its factory/service classes? If so, what is it? Or do we simply just use https://docs.python.org/3/library/http.client.html and go from there?
2. For example, I know that in .Net Framework, we have to be careful how we initialize HTTP clients as not to exhaust connection pool or create memory leak in C#- otherwise we risk bringing down the server. Does Python share same issue here? If so, what can/should I do to minimize bringing the harm to the health of Q2 servers while creating code that makes various POST requests to external API endpoints?
3. What about handling certificate handshake? What's the preferred way of making the vendors' api endpoints trusted? I believe that we should be importing vault into the code and use that, somehow?
4. What are the preferred timeout length before HTTP client should cancel its request? Is 1 minute sufficient? What is Q2's extension timeout default behavior from client AJAX to extension's endpoint?
5. Similar to #4, does Python support some kind of TokenCancellation that would indicate that client user cancelled the browser request (or, in some case, maybe Q2 cancelled the request because the extension took too long for itself to complete?) This is to help short-circuit the backend logic in the extension code not to continue with its flow-logic to help not waste Q2's server resources or external third-party vendor APIENDPOINT if caller request got cancelled.
6. What are the preferred way of persisting POSTED data based on user's data for a small duration of time (within 5 seconds?) To help combat users accidentially spamming API calls to the external endpoints while refreshing page.
The nature of this question is to help me make me become more informed on how to create some HTTP POST requests to various vendors API secure endpoints retrieving user data from Q2 extensions over SSL in a safe and secure way.
Edit: I should clarify, this is about backend logic in python making external requests to various API endpoints on behalf of a user (requester.)
Hello folks,
To help make the best use of HTTP clients making various POST requests to external URL, I would like to know if there are pits traps and to minimize any potentional security risk/memory leak. My background in Python or Q2 ecosystem are not strong. I'm trying to brush up my skillsets in this area. I don't know exactly how well Python handles the HTTP clients OR if I should be using Q2's classes, so here goes my questions:
1. Does Q2 provide its own HTTP client through its factory/service classes? If so, what is it? Or do we simply just use https://docs.python.org/3/library/http.client.html and go from there?
2. For example, I know that in .Net Framework, we have to be careful how we initialize HTTP clients as not to exhaust connection pool or create memory leak in C#- otherwise we risk bringing down the server. Does Python share same issue here? If so, what can/should I do to minimize bringing the harm to the health of Q2 servers while creating code that makes various POST requests to external API endpoints?
3. What about handling certificate handshake? What's the preferred way of making the vendors' api endpoints trusted? I believe that we should be importing vault into the code and use that, somehow?
4. What are the preferred timeout length before HTTP client should cancel its request? Is 1 minute sufficient? What is Q2's extension timeout default behavior from client AJAX to extension's endpoint?
5. Similar to #4, does Python support some kind of TokenCancellation that would indicate that client user cancelled the browser request (or, in some case, maybe Q2 cancelled the request because the extension took too long for itself to complete?) This is to help short-circuit the backend logic in the extension code not to continue with its flow-logic to help not waste Q2's server resources or external third-party vendor APIENDPOINT if caller request got cancelled.
6. What are the preferred way of persisting POSTED data based on user's data for a small duration of time (within 5 seconds?) To help combat users accidentially spamming API calls to the external endpoints while refreshing page.
The nature of this question is to help me make me become more informed on how to create some HTTP POST requests to various vendors API secure endpoints retrieving user data from Q2 extensions over SSL in a safe and secure way.
Edit: I should clarify, this is about backend logic in python making external requests to various API endpoints on behalf of a user (requester.)
Hello folks,
To help make the best use of HTTP clients making various POST requests to external URL, I would like to know if there are pits traps and to minimize any potentional security risk/memory leak. My background in Python or Q2 ecosystem are not strong. I'm trying to brush up my skillsets in this area. I don't know exactly how well Python handles the HTTP clients OR if I should be using Q2's classes, so here goes my questions:
1. Does Q2 provide its own HTTP client through its factory/service classes? If so, what is it? Or do we simply just use https://docs.python.org/3/library/http.client.html and go from there?
2. For example, I know that in .Net Framework, we have to be careful how we initialize HTTP clients as not to exhaust connection pool or create memory leak in C#- otherwise we risk bringing down the server. Does Python share same issue here? If so, what can/should I do to minimize bringing the harm to the health of Q2 servers while creating code that makes various POST requests to external API endpoints?
3. What about handling certificate handshake? What's the preferred way of making the vendors' api endpoints trusted? I believe that we should be importing vault into the code and use that, somehow?
4. What are the preferred timeout length before HTTP client should cancel its request? Is 1 minute sufficient? What is Q2's extension timeout default behavior from client AJAX to extension's endpoint?
5. Similar to #4, does Python support some kind of TokenCancellation that would indicate that client user cancelled the browser request (or, in some case, maybe Q2 cancelled the request because the extension took too long for itself to complete?) This is to help short-circuit the backend logic in the extension code not to continue with its flow-logic to help not waste Q2's server resources or external third-party vendor APIENDPOINT if caller request got cancelled.
6. What are the preferred way of persisting POSTED data based on user's data for a small duration of time (within 5 seconds?) To help combat users accidentially spamming API calls to the external endpoints while refreshing page.
The nature of this question is to help me make me become more informed on how to create some HTTP POST requests to various vendors API secure endpoints retrieving user data from Q2 extensions over SSL in a safe and secure way.
http client best practices or preferences?
Hello folks,
To help make the best use of HTTP clients making various POST requests to external URL, I would like to know if there are pits traps and to minimize any potentional security risk/memory leak. My background in Python or Q2 ecosystem are not strong. I'm trying to brush up my skillsets in this area. I don't know exactly how well Python handles the HTTP clients OR if I should be using Q2's classes, so here goes my questions:
1. Does Q2 provide its own HTTP client through its factory/service classes? If so, what is it? Or do we simply just use https://docs.python.org/3/library/http.client.html and go from there?
2. For example, I know that in .Net Framework, we have to be careful how we initialize HTTP clients as not to exhaust connection pool or create memory leak in C#- otherwise we risk bringing down the server. Does Python share same issue here? If so, what can/should I do to minimize bringing the harm to the health of Q2 servers while creating code that makes various POST requests to external API endpoints?
3. What about handling certificate handshake? What's the preferred way of making the vendors' api endpoints trusted? I believe that we should be importing vault into the code and use that, somehow?
4. What are the preferred timeout length before HTTP client should cancel its request? Is 1 minute sufficient? What is Q2's extension timeout default behavior from client AJAX to extension's endpoint?
5. Similar to #4, does Python support some kind of TokenCancellation that would indicate that client user cancelled the browser request (or, in some case, maybe Q2 cancelled the request because the extension took too long for itself to complete?) This is to help short-circuit the backend logic in the extension code not to continue with its flow-logic to help not waste Q2's server resources or external third-party vendor APIENDPOINT if caller request got cancelled.
6. What are the preferred way of persisting POSTED data based on user's data for a small duration of time (within 5 seconds?) To help combat users accidentially spamming API calls to the external endpoints while refreshing page.
The nature of this question is to help me make me become more informed on how to create some HTTP POST requests to various vendors API secure endpoints retrieving user data from Q2 extensions over SSL in a safe and secure way.