본문 바로가기

API5

stripe api my doc javascript(js) with nodejs https://stripe.com/docs/checkout/quickstart Stripe-hosted page stripe trigger ▶️ [event] stripe.com This link is simple api code with nodejs ↑ in there app.post('/create-checkout-session', async (req, res) => { const session = await stripe.checkout.sessions.create({ line_items: [ { // Provide the exact Price ID (for example, pr_1234) of the product you want to sell price: '{{PRICE_ID}}', quantit.. 2023. 12. 17.
apache proxypass, proxyreverse, rewriterule way how to use 안녕하세요 여러분, 크리에이트메이커 입니다. api를 만들면서 apache RewriteRule을 쓰게 됬는데요. 문제가 경로가 겹치면 겹친 경로로 가진다는 겁니다. 예를들어 RewriteRule ^/api/feed/([^/\.]+)/like/add 과 RewriteRule ^/api/feed/([^/\.]+)/like/add/plus 가 있을때, ^/api/feed/([^/\.]+)/like/add/plus를 사용하면 ^/api/feed/([^/\.]+)/like/add 일로 가버립니다. 왜냐하면 add까지 같고 ^/api/feed/([^/\.]+)/like/add가 더 먼저 선언돼있기 때문이죠. 이럴때는 방법이 2가지가 있습니다. 1. ^/api/feed/([^/\.]+)/like/add 끝에 ?$ .. 2023. 6. 3.
apache proxypass 할때 api 만들때, https get, post다 받으려면 그냥 RewriteRule 쓰세요!~~ 안녕하세요 여러분 크리에이트 메이커입니다. 오늘도 좋은 정보를 공유하고자글을쓰네요. 외주의뢰를 하면서 api작업의뢰를 맡았는데, 왠걸.. 서버가 https 네요..게다가 아파치... 그래서 proxypass, proxyrevers, proxymatch 을쓰면서 get과 post를 받기위해 애를썻는데요.. 결국 다 안되더군요,, 그래서 문서읽고 연구하고 찾은게 RewriteRule 입니다. 사실 80포트 http로 하면 proxypass, proxyrevers, proxymatch 로 get, post다 되는데, https로 하니까 안되더라구요. 요약 하면 ServerName library.ioneis.com:443 RewriteEngine on ProxyRequests Off SSLProxyEngine .. 2023. 6. 3.
retrofit을 이용한 open API 데이터 POJO 만들기,모델 만들기,데이터 틀 만들기 java 안녕하세요 여러분~ 요즘 앱 만들기가 유행인데요~ 저도 앱하다 만들고 있답니다. 개인 앱 개발자는 필수적으로 서버 통신 기능을 많이 이용하는데요~? 그중 API를 이용 할때가 많죠~ 그래서 API를 이용할때 retrofit2를 사용하는 분들이 읽으면 좋을것 같아요. 물론 다른 통신 라이브러리를 이용하는 분들도 읽으면 좋겠죠? API를 받을때 가장 귀찮은게 저는 데이터 모델을 만드는 것이라 생각해요. 전송 데이터에 맞게 class를 만들어줘야 잘 들어오더라구요. 안그러면 데이터 이상하게 들어오거나 오류가 나네요.. 제가 소개드릴 페이지는 http://pojo.sodhanalibrary.com/ Convert XML or JSON to Java Pojo Classes - Online pojo.sodhanal.. 2020. 8. 5.