line-api

PHP Using cURL and GET request with a header

…衆ロ難τιáo~ 提交于 2020-01-02 07:22:31
问题 There are slimier questions in the past like below. How do I send a GET request with a header from PHP? But I don't know why my code is not working. I want to get "status code 200 OK and image data in binary" by using cURL and GET request with a header. I may make mistake on debugging too. I would appreciate your any help. Thanks in advance! API refrence: https://devdocs.line.me/en/#get-content $url = "https://api.line.me/v2/bot/message/". $message_id. "/content"; $curl = curl_init("$url");

Consumer can't find in Kotlin

北城以北 提交于 2019-12-11 18:07:43
问题 I want to convert this Java example to kotlin. But... {responseBody -> .....} Type mismatch. fun handleAudioMessageEvent(event: MessageEvent<AudioMessageContent>) { handleHeavyContent( event.replyToken, event.message.id ) { responseBody -> val provider = event.message.contentProvider val mp4: DownloadedContent if (provider.isExternal) { mp4 = DownloadedContent(null, provider.originalContentUrl) } else { mp4 = saveContent("mp4", responseBody) } reply(event.replyToken, AudioMessage(mp4.uri, 100