Best practices for custom http user-agent strings? [closed] - web-services

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm developing an application that communicates with an internal web service using HTTP.
Are there any "best practices" for custom user-agent strings so that I can put a nice one in my app? It's a Python library and the lower transport is Python's own httplib. Should the user-agent string say that or something else?

For internal use you can use anything really.
Of course, internal or external its always a good idea to include contact information, either web or email address, in case something breaks or application goes out of control.
Check this big list of user agents for inspiration: http://www.user-agents.org/

It is considered good practice to include at least an email address so people can contact you if your application is causing problems. This will also be your best chance of not getting blocked.
It's common to put a name and version number as well. Other than that it's mostly freestyle. user-agents.org has alot of examples.
Don't forget to honor robots.txt as well.

You can write in user-agent what you want! But if you beware of your application HTTP queries to this server may be blocked, set user-agent to common browser (like Firefox on Gecko engine) then server admin don't know what application reads her page and in server logs don't see your application.

Related

Best way to have a web user interface for a Qt application? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have written a service using C++ and Qt framework (QtService). The service should run in the background. I need the service to have a web user interface and can be accessed using web browsers. I mean the service should act as as a web server and output html content to a specific port. I know there are some frameworks that can be used to generate web content in C++, but by taking into account that I am using Qt, I prefer to use Qt features as much as possible rather than a new framework. Any ideas?
I have read about Cutelyst on the Qt blog a few times, which seems an exact fit to your question.

What to use for a backend setup while working with AngularJS in client-side? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I need to build a backend for a web application, i'm using AngularJS in the client-side, but i'm lost in what to use to accomplish the backend stuff as well as the web service.
I've read about Breezejs but it requires .Net, i know php btw (yii), and i need this backend to accept and return JSON. It will be used to store users info and do crud operations.
This is a subjective question, not very suitable for StackOverflow...
...but I must recommend Laravel 4, since you are used to PHP.
If the INPUT is JSON, the framework delivers it to you easily:
$value = Input::get('key');
If you are returning a model, its toArray method is applied automatically:
return $this->user->configuration;
The code snippet above is actually a real single-liner controller method I have in my app. The user is already logged in... there is a "configuration" table (one-to-one relationship)... With the above line, Eloquent (Laravel ORM) will make the proper query, fetch the result, and return the record... and it will be transformed into JSON for delivery...
I am used to several PHP frameworks, from Code Igniter to Symfony 2 - and I've never been happier than now with Laravel 4.
Yii is a normal solution since you already know some PHP, so this is the easy way.
Another way is if you want some exotic, I'll recommend CompoundJS framework for node.js, its good for REST API.

Documenting ServiceStack web services [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
What are the options for documenting a ServiceStack bases web services and I'm not talking about a one line string.
I would like to be able to document, in detail (which can be long), return types, possible HTTP responses, add detailed examples etc.
Is there any support for this in ServiceStack (I couldn't find it)?
If not has anybody solved the problem in some other way.
You can provide metadata descriptions for each of your web services by attributing your Request DTOs with [Api] and [ApiMember] attributes.
This information will be displayed on the dynamic metadata pages.
Another option is to simply create your own dynamic html page, which ServiceStack allows you to do by simply returning a string (containing your html markup). If you go this route you can access the Service Types metadata with the global EndpointHost.ServiceOperations property.
Also if dynamically generating html with C# is not your preference you can also generate html using the built-in Razor Markdown format which makes generating html quite pleasant :)
I realize this question is a couple years old, but there is now Swagger support for ServiceStack API's # https://github.com/ServiceStack/ServiceStack/wiki/Swagger-API

Xcelsius: Retrieve data from Web service [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
My company is considering buying Xcelsius to allow users the production of dashboards
I think the tool is quite powerful as far as the dashboard creation is concerned, many widgets, based on Excel which the users know well...
I was wondering how good the product was to retrieve data from a web service (WCF for instance) and if the generated SWF was able to update it once it has been published on a web server
Any feedback appreciated.
Thanks
I know it has been quite some time since you asked this question but here is my answer. The company that I work for uses Xcelsius to create dashboards from a web-service that serves up XML. There are properties in an Xcelsius project that allow the swf to re-query the web-service when parameters have been changed.
The only problem that we have had with the product is it is difficult (possibly impossible, we haven't figured it out) to use a web-service that has authentication. Xcelsius only hit's a URL for the web-service and as such cannot change the authentication headers if the web-service requires a username/password.
In the Web Service connection there is a tab for "Advanced". On this tab you can enter anything you want sent in the SOAP header... such as username & password. Xcelsius doesn't understand the idea of logging in, but putting the static text here will include it in the header and allow you to access data that requires authentication.

Do any URL Shortening services with link tracking have a https accessible url? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have three websites that I want to generate tiny urls for search result pages every time someone clicks search. I like the http://bit.ly api and the fact that it offers tracking. However, it requires me to provide a password and does not offer ssl support. Does anyone know of a similar service that offers tracking, and a https accessible API?
I think short URLs for HTTPs connections are really bad idea. After all SSL is here to ensure (part of its job) that you are actually talking to the server requested.
But in short URL scenario you are talking to a different server first - an ideal scammer situation.
Bit.ly doesn't require you to send a password using their API; they require you to pass a token (aka API Key) that isn't in any way tied to your password. It's an URL shortening service after all. Considering all the information is pretty much public anyway, security shouldn't be a concern.