I am using this library to make a simple server. I want to use its post method, but couldn't figure out to pass and use the parameters in the URL. It's not well documented too. Let me know if anyone has some experience with this library or is able to figure out the same.
Related
I have searched the internet for 2 days having found no answer to the below requirement. What i found most were GeckoFX and CefSharp which are external packages and not installed libraries. How can this be done?
I have been asked to do the following:
Use a suitable library function out of the set of libraries installed with the .NET platform. You must not use the C# WebBrowser class but perform the required HTTP-level communication directly from within your code. The code must clearly identify the HTTP-level client-server communication and must explicitly manage Home page, Favourite, History Lists and Tabs.
Optionally, you may add functionality to render a web page, but there must be an option to disable this functionality and to show only the raw HTML that has been retrieved.
Thanks
What have you attempted so far and what problem are you encountering?
Maybe read this first :)
Currently it sounds like you have been given an interview or homework task that you dont know how to solve. If so, then you should have some idea on where to start or you are in the wrong course or job interview. If you want help, then try to solve the question yourself and ask for help when you are stuck. Tell us what you have tried, show the code you currently have and let us know where you are stuck or what doesnt work as expected.
Where are you stuck? Fetching the webpage? Building the user interface?
I want to use HTTP methods (GET/PUT/POST/DELETE) with an Azure resource and even have the URIs to do so. I understand that this practice utilizes RESTful web services.
What file type or programming language do I use to call these? On every documentation site that I have found, the only thing I see is something like the following, without any context:
Method Request URI
POST https://media.windows.net/api/Channels(‘*channelid*’)/Stop
So, where do I include this? HTML? C#? Do I create an ASP.NET web app and place it somewhere in there?
This would be very helpful to know so that I can utilize these methods!
You can use any programming language that has http support, or indeed your browser (most have native support to alter requests).
A more convenient alternative to test the api might be a rest client, a popular one being postman, a browser plugin.
I'm pretty new to Apigee so apologies in advanced. We currently have an api which is accessed an Apigee proxy. From reading the Apigee best practices it looks like we should version the api in the URL like so
api/v1/endpoint/
How do I go about stripping the version out of the URL and using it to target the correct api?
Thanks
Rather than answering this with more theoretical content - I would suggest you try out the first sample - Add and configure your first API and you will be on your way to build your production API with good grip on how to use Apigee.
How do I go about stripping the version out of the URL and using it to target the correct api?
If you choose your base path to be "api/v1/endpoint/" like so:
<HTTPProxyConnection>
<BasePath>/api/v1/endpoint</BasePath>
<VirtualHost>default</VirtualHost>
</HTTPProxyConnection>
then only the part of the URL after /api/v1/endpoint will be sent to the target. In this way, you avoid passing along the version portion of the URL to your target.
There are a few tutorials on the web regarding the multi apps structure with Symfony 2, however I haven't seen any post on cross linking the apps (in term of http urls, how do you generate a link to the frontend blog post from your backend application?)
It's possible to put all the shared routes in a shared bundle, but then how do we generate the apps with the correct application path applied to it? For example, in my case I need to generate mysite.com/reset_password but since I do it from the backend I always get mysite.com/backend/reset_password. Of course I can trim the /backend/ out manually but that does not seem like the way to do it.
PS: I understand the downside of the multiple apps structure, however there are reason we want to use it.
As far as I know there is no built in way to do that, but it doesn't sound especially difficult to do.
Create a web service on the site you want to link to which provides URLs to specific locations. You can then normalize these URLs to generic keys. Then create an internal service to build a URL from this data.
I'm trying to use R to grab some web data that requires OAuth authentication. Searching on CRAN and RSeek.org for info on OAuth + R provides nothing. Any tips for accessing RESTful APIs with R using OAuth?
I'm considering using some Python/Perl/Ruby to grab the data, save it to a text file, then work on it with R. I'd prefer to stay totally in R, but it seems like OAuth is a barrier.
Turns out Jeff Gentry from TwitteR wrote his own OAuth R library.
http://cran.r-project.org/web/packages/ROAuth/index.html
Best approach now appears to be to use httr (https://github.com/r-lib/httr)
One option I stumbled on is called OAuth Proxy and it slips the OAuth headers in using a proxy. This is an interesting kludge.
Another possible, assuming you have access to the required crypto functions in R, you can implement OAuth completely as HTTP requests without any lib support etc.
While writing a complete oauth lib might be asking too much, if you just need a quick and dirty way to pull down data, it shouldn't be too difficult to hand craft the few functions you need to complete an oauth request.
Also, while R may not have an oauth lib, most of the difficult part of oauth is in the interaction between servers, not in creating the tokens/requests, so you should be able to look at another language's implementation and port the required logic to R. I would suggest looking at a simple lib from http://oauth.net/code/ for a starting point.
It's possible to do this with the RCurl library as well. The main thing is that you parse the access_tokens and authorization verifications correctly. But I've managed to pull lots of data off of facebook with R via getURL.