from meutils.pipe import * from meutils.request_utils import request4retry from appzoo.streamlit_app import Page import streamlit as st from streamlit.components.v1 import html, iframe class MyPage(Page): def main(self): with st.form("Coding"): col, *_ = st.columns(4) method = col.selectbox('method', ['GET', 'POST']) url = st.text_input('url') data = st.text_area('data', {}) data = json.loads(data) kwargs = {} if st.form_submit_button("开始请求"): _ = requests.request(method, url, json=data, **kwargs) return st.json(_) if __name__ == '__main__': MyPage(layout='wide').main()