Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0, 2.0.1
    • Component/s: jclouds-core
    • Labels:
      None

      Description

      Give your users the ability to prepend a custom user agent. So if the existing user agent is "jclouds/1.8.1 java/1.7.0_51"

      Provide a method for your users to easily prepend their own user agent so they can further customize it. e.g. "users-app/0.1.2 jclouds/1.8.1 java/1.7.0_51"

      This will give cloud providers much better insight into how people are using jclouds. This should be well documented and part of examples that are written for jclouds.

      It could be set like,

      ComputeServiceContext context = ContextBuilder.newBuilder(PROVIDER)
         .credentials(username, apiKey)
         .userAgent("users-app/0.1.2")
         .buildView(ComputeServiceContext.class);
      

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 79ad45d6b97f2879db40cd720764af237934a309 in jclouds's branch refs/heads/2.0.x from Vijay Panghal
        [ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=79ad45d ]

        Make user agent header configurable

        Jclouds sends default user agent string with each request to cloud
        services. But some of the application would like to overide this and
        send custom user agent instead.

        This commit define a string property to overide this default user agent
        string. This property will be applied to all outgoing http request to
        cloud services

        JCLOUDS-819

        Show
        jira-bot ASF subversion and git services added a comment - Commit 79ad45d6b97f2879db40cd720764af237934a309 in jclouds's branch refs/heads/2.0.x from Vijay Panghal [ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=79ad45d ] Make user agent header configurable Jclouds sends default user agent string with each request to cloud services. But some of the application would like to overide this and send custom user agent instead. This commit define a string property to overide this default user agent string. This property will be applied to all outgoing http request to cloud services JCLOUDS-819
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit f3c3f3b30620ad62dc502cf79bf121ec1773396e in jclouds's branch refs/heads/master from Vijay Panghal
        [ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=f3c3f3b ]

        Make user agent header configurable

        Jclouds sends default user agent string with each request to cloud
        services. But some of the application would like to overide this and
        send custom user agent instead.

        This commit define a string property to overide this default user agent
        string. This property will be applied to all outgoing http request to
        cloud services

        JCLOUDS-819

        Show
        jira-bot ASF subversion and git services added a comment - Commit f3c3f3b30620ad62dc502cf79bf121ec1773396e in jclouds's branch refs/heads/master from Vijay Panghal [ https://git-wip-us.apache.org/repos/asf?p=jclouds.git;h=f3c3f3b ] Make user agent header configurable Jclouds sends default user agent string with each request to cloud services. But some of the application would like to overide this and send custom user agent instead. This commit define a string property to overide this default user agent string. This property will be applied to all outgoing http request to cloud services JCLOUDS-819
        Hide
        vpanghal Vijay Panghal added a comment -

        Ignasi Barrera Zack Shoylev I have created a pull request for this. Can you please take a look at this and provide feedback on this?

        https://github.com/jclouds/jclouds/pull/1043

        Show
        vpanghal Vijay Panghal added a comment - Ignasi Barrera Zack Shoylev I have created a pull request for this. Can you please take a look at this and provide feedback on this? https://github.com/jclouds/jclouds/pull/1043
        Hide
        everett-toews Everett Toews added a comment -

        Me too. As long as it gets well documented.

        Show
        everett-toews Everett Toews added a comment - Me too. As long as it gets well documented.
        Hide
        zack-s Zack Shoylev added a comment -

        I'm ok with using a property.

        Show
        zack-s Zack Shoylev added a comment - I'm ok with using a property.
        Hide
        nacx Ignasi Barrera added a comment -

        I don't know if it is good to expose transport specific features in the ContextBuilder. It should be used to describe the api or view being loaded, but I wouldn't expose such concrete things there.

        I'd rather use a context property or other mechanism to allow users to override (or bind to the injector) the user agent.

        Show
        nacx Ignasi Barrera added a comment - I don't know if it is good to expose transport specific features in the ContextBuilder. It should be used to describe the api or view being loaded, but I wouldn't expose such concrete things there. I'd rather use a context property or other mechanism to allow users to override (or bind to the injector) the user agent.
        Hide
        zack-s Zack Shoylev added a comment -

        I will try to have a look at this later this week.

        Show
        zack-s Zack Shoylev added a comment - I will try to have a look at this later this week.

          People

          • Assignee:
            Unassigned
            Reporter:
            everett-toews Everett Toews
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development