Hi,
As mentioned in this thread I'm looking to bring JSON data into Cinema 4D via HTTP GET request. I noticed in the C++ docs that there's a NetworkHttpHandlerInterface Class. I also noticed in the python docs that the maxon
API implements a url
type.
What's the state of these implementations and can they be used to make a connection to an HTTP server and request data? I think I've managed to successfully connect to a remote server, but I can't figure out how to read the data or make more specific requests.
"""Name-en-US: Simple HTTP Requests
Description-en-US: Prints the result of connecting to wikipedia.org
"""
import c4d
from c4d import gui
import maxon
def main():
url = maxon.Url("https://www.wikipedia.org/")
connection = url.OpenConnection()
print connection
if __name__=='__main__':
main()
If it's possible, could someone share some example code for how to use the maxon
API to print the results of an HTTP GET request in python
. If it's not yet possible, may I request that it be added to the SDK?
Thank you,
Donovan