classic asp 에서 TEXT 전송은 아래 소스로 잘 되는데요.
Function getNHNApiMulti(objUrl, objParam)
Dim objXmlHttp
Set objXmlHttp = Server.CreateObject(“MSXML2.ServerXMLHTTP.6.0”)
objXmlHttp.open “GET”, objUrl, False
objXmlHttp.setRequestHeader “Content-Type”,"application/json, charset=UTF-8"
objXmlHttp.send(objParam)
If (objXmlHttp.readyState = 4) And (objXmlHttp.status = 200) Then
getNHNApiMulti = objXmlHttp.responseText
End If
Set objXmlHttp = Nothing
End Function
아래 curl을 asp로 변경하여 이미지를 전송하려면 어떻게 해야 하나요 ?
curl -X POST -H “Content-Type: multipart/form-data” -F "이미지
–>
objParam에 파일경로를 넣는건 않되네요 ^^;;;;
Function getNHNApiMulti(objUrl, objParam)
Dim objXmlHttp
Set objXmlHttp = Server.CreateObject(“MSXML2.ServerXMLHTTP.6.0”)
objXmlHttp.open “POST”, objUrl, False
objXmlHttp.setRequestHeader “Content-Type”,"multipart/form-data;"
objXmlHttp.send(objParam)
If (objXmlHttp.readyState = 4) And (objXmlHttp.status = 200) Then
getNHNApiMulti = objXmlHttp.responseText
End If
Set objXmlHttp = Nothing
End Function