I am brand new to D programming so please excuse my ignorance. I am trying to create a basic program to connect to a website and download a page or connect to a restful API and download info. Right now all I need to worry about is TCP (streams). I'm using the std.socket library. Unfortunately I can't find much online or in the documentation that illustrates the proper syntax. I've done this in PHP and C++ and understand the concepts, but I could really use some help on syntax. If someone could post an example or a link it would be greatly appreciated!
Check out the htmlget.d sample that comes with your D compiler. You can see it online here.
You can find detailed documentation for the relevant standard library functions on the D website.
However, if you only need to access HTTP, it would be much simpler to use std.net.curl:
import std.net.curl;
string html = get("dlang.org");
Related
I'm a student. For my Distributed Systems project, I'm expected to create a gRPC project. I'm creating the project in Eclipse.
Two service implementation are to be coded in Java and the other is to be done in another coding language.
I've tried searching for help online but the results I'm getting are related to gRPC and how gRPC works, not about the coding or using other coding.
Ideally, I would like to use Python as the other language and to create it in Eclipse if possible. Does anyone have any information, documentation or examples I could look at, so I could can reference it?
I am able to see online searches for both Java and Python, but I'm not sure how to use both in one project.
Thank you.
So I got a lot of feedback for lecturers and classmates.
The server doesn't care what programming language is used.
So Java, Python, Node.js etc, could all be sent to the server.
A generalised simplistic idea of how I was able to understand is: Python converts its code to binary and sends it to the server. Same with Java and Node.js.
I don't know why, but I was digging myself deeper trying to figure out what code (i.e. the binary) that needed to be the communication between the server and code. I was trying to encapsulate Python into Java and vice versa.
Why did I think this? Your guess is as good as mine.
Guys really need your help I’m a beginner and don’t have any idea on how to create a owner or server for my project (photography booking app) I already started to create a client apps to make a log in or create a request/ book.. but how can I make a server or owner app who can see the request from client app. Can you please give me a tips or instruction not only on how to do it but the most is to understand how it really works Thanks in advance .
You've not really provided much info to go off (for example, what if any languages you're already comfortable using). There's probably too much to cover to explain here.
That said, for creating a backend, I personally found Flask pretty light and simple to get started with. There's also a really excellent tutorial series on it here: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-v-user-logins
Maybe start here?
Does anybody know if there is an implementation of the wikipedia api in objective c?
which can be used to access and display the information a bit nicer then with the plain website.
I'm thinking of something like the wikipanion app but not so sophisticated.
Thanks
Joerg
I know the question is very old. But just for other ppl who are dealing with the same issue. I wrote a very small library which provides basic access to the Wikipedia API.
You can get it on github:
https://github.com/prine/WikiApiObjectiveC
You can use the MediaWiki API to download the markup text.
Also, why not look at http://en.m.wikipedia.org/ ?
I would like to know whether if there is any Objective-C MSN API. I have searched for a while and could not really find one.
And if not could somebody tell some good place to look to start the protocol from scratch. Some points on how to start with.
I found this site mentioning details about the protocol. But still not sure how to start with.
http://www.hypothetic.org/docs/msn/index.php
Thank you and Kind Regards,
Tharindu
I think you might be out of luck. MSN is proprietary so APIS are going to be thin on the ground and those that exist will be reverse engineered.
Having said that, Pidgin is an open source IM client that supports MSN. You could use its core library (libpurple) which is written in C and hence compatible with Objective-C.
I do realize this is a duplicate question, however the only other question is quite old, so I would like to know if anyone has had any recent experience with the latest version of wsdl2objc.
I am doing an application that will communicate with SOAP Web services exposed by a third party application (it only exposes them this way unfortunately). As far as I understand all wsdl2objc does is convert the WSDL to something useful in objective C code. I have also done the tutorial icodeblog intro to soap
So has anyone used the latest version of wsdl2objc?, what is your experience with it?, did you run into any problems with it?. Please let me know. Also some code sample would be really great.
Any information available on using SOAP Web Services with iPhone would be appreciated. Thank you.
-Oscar
My most recent experiences with wsdl2objc is that it's on the right road, but not really there yet. It's definitely the kind of program you'd want. It just may or may not be able to handle the WSDLs you actually have.
Short answer: try it and see if it works for your WSDLs. If it does, hooray. If it doesn't, you have two options. For reasonably simple WSDLs, write the SOAP by hand. This often is actually the easiest approach. If the WSDL is complex, then use gSOAP to get to C++ and then wrap the C++ in Objective-C++ (or use the -c option to gSOAP and wrap the resulting C, whichever you're more comfortable with).
I think this gives a good example of how to configure your environment (for noobs like me)
http://blog.futurebytez.com/2010/05/calling-web-services-using-wsdl2objc.html
The official wiki for wsdl2objc (linked in the article) has a code snippet which gives you the basics.