플밍_ASP
classic asp json data request
잠수콩
2017. 12. 13. 14:39
제목 : classic asp json send, receive
소스 :
Function BytesToStr(bytes)
Dim Stream
Set Stream = Server.CreateObject("Adodb.Stream")
Stream.Type = 1 'adTypeBinary
Stream.Open
Stream.Write bytes
Stream.Position = 0
Stream.Type = 2 'adTypeText
Stream.Charset = "utf-8"
BytesToStr = Stream.ReadText
Stream.Close
Set Stream = Nothing
End Function
If Request.TotalBytes > 0 Then
Dim lngBytesCount, jsonText
lngBytesCount = Request.TotalBytes
jsonText = BytesToStr(Request.BinaryRead(lngBytesCount))
Response.ContentType = "text/plain"
Response.Write "Your " & Request.ServerVariables("REQUEST_METHOD") & " data was: " & post
End If
내용 :
asp 페이지에서 json request 하는 방법
예제 소스 파일 :
출처 :