3초기억력

classic asp json data request 본문

플밍_ASP

classic asp json data request

잠수콩 2017. 12. 13. 14:39
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.



제목 : 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 하는 방법






예제 소스 파일 :


 출처 :  




Comments