{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments/33885544","id":33885544,"diff_hunk":"@@ -16,69 +16,191 @@\n \n package org.wso2.carbon.apimgt.gateway.handlers.security;\n \n+import org.apache.axis2.Constants;\n import org.apache.commons.logging.Log;\n import org.apache.commons.logging.LogFactory;\n+import org.apache.http.HttpStatus;\n import org.apache.synapse.ManagedLifecycle;\n import org.apache.synapse.MessageContext;\n+import org.apache.synapse.config.xml.rest.VersionStrategyFactory;\n import org.apache.synapse.core.SynapseEnvironment;\n import org.apache.synapse.core.axis2.Axis2MessageContext;\n-import org.apache.synapse.rest.AbstractHandler;\n+import org.apache.synapse.rest.*;\n+import org.apache.synapse.rest.dispatch.RESTDispatcher;\n import org.wso2.carbon.apimgt.gateway.handlers.Utils;\n+import org.wso2.carbon.apimgt.gateway.internal.ServiceReferenceHolder;\n import org.wso2.carbon.apimgt.impl.APIConstants;\n+import org.wso2.carbon.apimgt.impl.utils.APIUtil;\n \n+import java.util.Arrays;\n+import java.util.List;\n import java.util.Map;\n \n-/**\n- * This handler functions as an enabler for the Store API Console\n- * Sets the Access-Control-Allow-Origin header\n- *\n- */\n public class CORSRequestHandler extends AbstractHandler implements ManagedLifecycle {\n \n-    private static final Log log = LogFactory.getLog(CORSRequestHandler.class);\n-\n-    public void init(SynapseEnvironment synapseEnvironment) {\n-        log.debug(\"Initializing API authentication handler instance\");\n-    }\n-\n-    public void destroy() {\n-        log.debug(\"Destroying API authentication handler instance\");\n-    }\n-\n-    public boolean handleRequest(MessageContext messageContext) {\n-\n-        if (Utils.isCORSEnabled()) {\n-\t    \t/* For CORS support adding required headers to the response */\n-            org.apache.axis2.context.MessageContext axis2MC = ((Axis2MessageContext) messageContext).\n-                    getAxis2MessageContext();\n-            Map<String, String> headers = (Map) axis2MC.getProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS);\n-            String requestOrigin = (String) headers.get(\"Origin\");\n-\n-            headers.put(APIConstants.CORSHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, Utils.getAllowedOrigin(requestOrigin));\n-            headers.put(APIConstants.CORSHeaders.ACCESS_CONTROL_ALLOW_METHODS, Utils.getAllowedMethods());\n-            headers.put(APIConstants.CORSHeaders.ACCESS_CONTROL_ALLOW_HEADERS, Utils.getAllowedHeaders());\n-            axis2MC.setProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS, headers);\n-        }\n-\n-        return true;\n-    }\n-\n-    public boolean handleResponse(MessageContext messageContext) {\n-\n-    \tif (Utils.isCORSEnabled()) {\n-\t    \t/* For CORS support adding required headers to the response */\n-\t    \torg.apache.axis2.context.MessageContext axis2MC = ((Axis2MessageContext) messageContext).\n-\t                getAxis2MessageContext();\n-\t    \tMap<String, String> headers = (Map) axis2MC.getProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS);\n-            String requestOrigin = (String) headers.get(\"Origin\");\n-\t    \t\t    \t    \t\n-\t    \theaders.put(APIConstants.CORSHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, Utils.getAllowedOrigin(requestOrigin));\n-\t        headers.put(APIConstants.CORSHeaders.ACCESS_CONTROL_ALLOW_METHODS, Utils.getAllowedMethods());\n-\t        headers.put(APIConstants.CORSHeaders.ACCESS_CONTROL_ALLOW_HEADERS, Utils.getAllowedHeaders());\n-\t        axis2MC.setProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS, headers);\n-    \t}\n- \n-        return true;\n-    }\n+\tprivate static final Log log = LogFactory.getLog(CORSRequestHandler.class);\n+\tprivate String inline;\n+\tprivate String allowHeaders;\n+\tprivate List<String> allowedOrigins;\n+\tprivate boolean headerStatus;\n+\n+\tpublic void init(SynapseEnvironment synapseEnvironment) {\n+\t\tif (log.isDebugEnabled()) {\n+\t\t\tlog.debug(\"Initializing CORSRequest Handler instance\");\n+\t\t}\n+\t\tif (ServiceReferenceHolder.getInstance().getApiManagerConfigurationService() != null) {\n+\t\t\theaderStatus = initializeHeaders();\n+\t\t}\n+\t}\n+\n+\tpublic boolean initializeHeaders() {\n+\t\tif (allowHeaders == null) {\n+\t\t\tallowHeaders = Utils\n+\t\t\t\t\t.getAllowedHeaders();\n+\t\t}\n+\t\tif (allowedOrigins == null) {\n+\t\t\tallowedOrigins = Arrays.asList(ServiceReferenceHolder.getInstance().getAPIManagerConfiguration().\n+\t\t\t\t\tgetFirstProperty(APIConstants.CORS_CONFIGURATION_ACCESS_CTL_ALLOW_ORIGIN).split(\",\"));\n+\t\t}\n+\t\treturn true;\n+\t}\n+\n+\tpublic void destroy() {\n+\t\tif (log.isDebugEnabled()) {\n+\t\t\tlog.debug(\"Destroying CORSRequest Handler handler instance\");\n+\t\t}\n+\t}\n+\n+\tpublic boolean handleRequest(MessageContext messageContext) {\n+\t\tif (!headerStatus) {\n+\t\t\theaderStatus = initializeHeaders();\n+\t\t}\n+\t\tString apiContext = (String) messageContext.getProperty(RESTConstants.REST_API_CONTEXT);\n+\t\tString apiVersion = (String) messageContext.getProperty(RESTConstants.SYNAPSE_REST_API_VERSION);\n+\t\tString httpMethod = (String) ((Axis2MessageContext) messageContext).getAxis2MessageContext().\n+\t\t\t\tgetProperty(Constants.Configuration.HTTP_METHOD);\n+\t\tAPI selectedApi = null;\n+\t\tResource selectedResourceWithVerb = null;\n+\t\tResource selectedResource = null;\n+\t\tboolean status = false;\n+\n+\t\tfor (API api : messageContext.getConfiguration().getAPIs()) {\n+\t\t\tif (apiContext.equals(api.getContext()) && apiVersion.equals(api.getVersion())) {\n+\t\t\t\tselectedApi = api;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t\tString subPath;\n+\t\tString path = RESTUtils.getFullRequestPath(messageContext);\n+\t\tif (selectedApi.getVersionStrategy().getVersionType().equals(VersionStrategyFactory.TYPE_URL)) {\n+\t\t\tsubPath = path.substring(\n+\t\t\t\t\tselectedApi.getContext().length() + selectedApi.getVersionStrategy().getVersion().length() + 1);\n+\t\t} else {\n+\t\t\tsubPath = path.substring(selectedApi.getContext().length());\n+\t\t}\n+\t\tif (\"\".equals(subPath)) {\n+\t\t\tsubPath = \"/\";\n+\t\t}\n+\t\tmessageContext.setProperty(RESTConstants.REST_SUB_REQUEST_PATH, subPath);\n+\n+\t\tif (selectedApi.getResources().length > 0) {\n+\t\t\tfor (RESTDispatcher dispatcher : RESTUtils.getDispatchers()) {\n+\t\t\t\tResource resource = dispatcher.findResource(messageContext, Arrays.asList(selectedApi.getResources()));\n+\t\t\t\tif (resource != null) {\n+\t\t\t\t\tselectedResource = resource;\n+\t\t\t\t\tif (Arrays.asList(resource.getMethods()).contains(httpMethod)) {\n+\t\t\t\t\t\tselectedResourceWithVerb = resource;\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\t\tString resourceString =\n+\t\t\t\tselectedResourceWithVerb != null ? selectedResourceWithVerb.getDispatcherHelper().getString() : null;\n+\t\tString resourceCacheKey = APIUtil\n+\t\t\t\t.getResourceInfoDTOCacheKey(apiContext, apiVersion, resourceString, httpMethod);\n+\t\tmessageContext.setProperty(APIConstants.API_ELECTED_RESOURCE, resourceString);\n+\t\tmessageContext.setProperty(APIConstants.API_RESOURCE_CACHE_KEY, resourceCacheKey);\n+\t\tsetCORSHeaders(messageContext, selectedResourceWithVerb);\n+\t\tif (selectedResource != null && selectedResourceWithVerb != null) {\n+\t\t\t\tif (\"inline\".equals(inline)) {\n+\t\t\t\t\tmessageContext.getSequence(\"_cors_request_handler\").mediate(messageContext);\n+\t\t\t\t}\n+\t\t\t\tstatus =  true;\n+\t\t\t}else if (selectedResource != null && selectedResourceWithVerb == null ){\n+\t\t\tif (\"OPTIONS\".equalsIgnoreCase(httpMethod)) {\n+\t\t\t\tmessageContext.getSequence(\"_cors_request_handler\").mediate(messageContext);\n+\t\t\t\tUtils.send(messageContext, HttpStatus.SC_OK);\n+\t\t\t\tstatus = false;\n+\t\t\t} else {\n+\t\t\t\tstatus = true;\n+\t\t\t}\n+\t\t}else{\n+\t\t\tstatus = true;\n+\t\t}\n+\t\treturn status;\n+\t}\n+\n+\tpublic boolean handleResponse(MessageContext messageContext) {\n+\t\tmessageContext.getSequence(\"_cors_request_handler\").mediate(messageContext);\n+\t\treturn true;\n+\t}\n+\n+\t/**\n+\t * @param messageContext   message context for set cors headers as properties\n+\t * @param selectedResource resource according to the request\n+\t */\n+\tpublic void setCORSHeaders(MessageContext messageContext, Resource selectedResource) {","path":"components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/security/CORSRequestHandler.java","position":189,"original_position":189,"commit_id":"2b495f9199e5e464334a1039d64b10254f02b0cc","original_commit_id":"2b495f9199e5e464334a1039d64b10254f02b0cc","user":{"login":"tharindu1st","id":6345931,"avatar_url":"https://avatars.githubusercontent.com/u/6345931?v=3","gravatar_id":"","url":"https://api.github.com/users/tharindu1st","html_url":"https://github.com/tharindu1st","followers_url":"https://api.github.com/users/tharindu1st/followers","following_url":"https://api.github.com/users/tharindu1st/following{/other_user}","gists_url":"https://api.github.com/users/tharindu1st/gists{/gist_id}","starred_url":"https://api.github.com/users/tharindu1st/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tharindu1st/subscriptions","organizations_url":"https://api.github.com/users/tharindu1st/orgs","repos_url":"https://api.github.com/users/tharindu1st/repos","events_url":"https://api.github.com/users/tharindu1st/events{/privacy}","received_events_url":"https://api.github.com/users/tharindu1st/received_events","type":"User","site_admin":false},"body":"fixed by https://github.com/wso2/carbon-apimgt/pull/792","created_at":"2015-07-04T07:26:54Z","updated_at":"2015-07-04T07:26:54Z","html_url":"https://github.com/wso2/carbon-apimgt/pull/209#discussion_r33885544","pull_request_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/209","_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments/33885544"},"html":{"href":"https://github.com/wso2/carbon-apimgt/pull/209#discussion_r33885544"},"pull_request":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/209"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/209","id":33926311,"html_url":"https://github.com/wso2/carbon-apimgt/pull/209","diff_url":"https://github.com/wso2/carbon-apimgt/pull/209.diff","patch_url":"https://github.com/wso2/carbon-apimgt/pull/209.patch","issue_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/209","number":209,"state":"closed","locked":false,"title":"Cors feature","user":{"login":"tharindu1st","id":6345931,"avatar_url":"https://avatars.githubusercontent.com/u/6345931?v=3","gravatar_id":"","url":"https://api.github.com/users/tharindu1st","html_url":"https://github.com/tharindu1st","followers_url":"https://api.github.com/users/tharindu1st/followers","following_url":"https://api.github.com/users/tharindu1st/following{/other_user}","gists_url":"https://api.github.com/users/tharindu1st/gists{/gist_id}","starred_url":"https://api.github.com/users/tharindu1st/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tharindu1st/subscriptions","organizations_url":"https://api.github.com/users/tharindu1st/orgs","repos_url":"https://api.github.com/users/tharindu1st/repos","events_url":"https://api.github.com/users/tharindu1st/events{/privacy}","received_events_url":"https://api.github.com/users/tharindu1st/received_events","type":"User","site_admin":false},"body":"fixed\r\nCORS Handler\r\n-Dsetup issue with stats publishing","created_at":"2015-04-23T05:59:34Z","updated_at":"2015-07-04T07:26:54Z","closed_at":"2015-04-24T12:41:03Z","merged_at":"2015-04-24T12:41:03Z","merge_commit_sha":"daa672153536941600553170620691fdd4842962","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/209/commits","review_comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/209/comments","review_comment_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/209/comments","statuses_url":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/2b495f9199e5e464334a1039d64b10254f02b0cc","head":{"label":"tharindu1st:CORSFeature","ref":"CORSFeature","sha":"2b495f9199e5e464334a1039d64b10254f02b0cc","user":{"login":"tharindu1st","id":6345931,"avatar_url":"https://avatars.githubusercontent.com/u/6345931?v=3","gravatar_id":"","url":"https://api.github.com/users/tharindu1st","html_url":"https://github.com/tharindu1st","followers_url":"https://api.github.com/users/tharindu1st/followers","following_url":"https://api.github.com/users/tharindu1st/following{/other_user}","gists_url":"https://api.github.com/users/tharindu1st/gists{/gist_id}","starred_url":"https://api.github.com/users/tharindu1st/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tharindu1st/subscriptions","organizations_url":"https://api.github.com/users/tharindu1st/orgs","repos_url":"https://api.github.com/users/tharindu1st/repos","events_url":"https://api.github.com/users/tharindu1st/events{/privacy}","received_events_url":"https://api.github.com/users/tharindu1st/received_events","type":"User","site_admin":false},"repo":{"id":31155467,"name":"carbon-apimgt","full_name":"tharindu1st/carbon-apimgt","owner":{"login":"tharindu1st","id":6345931,"avatar_url":"https://avatars.githubusercontent.com/u/6345931?v=3","gravatar_id":"","url":"https://api.github.com/users/tharindu1st","html_url":"https://github.com/tharindu1st","followers_url":"https://api.github.com/users/tharindu1st/followers","following_url":"https://api.github.com/users/tharindu1st/following{/other_user}","gists_url":"https://api.github.com/users/tharindu1st/gists{/gist_id}","starred_url":"https://api.github.com/users/tharindu1st/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tharindu1st/subscriptions","organizations_url":"https://api.github.com/users/tharindu1st/orgs","repos_url":"https://api.github.com/users/tharindu1st/repos","events_url":"https://api.github.com/users/tharindu1st/events{/privacy}","received_events_url":"https://api.github.com/users/tharindu1st/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tharindu1st/carbon-apimgt","description":"","fork":true,"url":"https://api.github.com/repos/tharindu1st/carbon-apimgt","forks_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/forks","keys_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/teams","hooks_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/hooks","issue_events_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/issues/events{/number}","events_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/events","assignees_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/assignees{/user}","branches_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/branches{/branch}","tags_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/tags","blobs_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/git/refs{/sha}","trees_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/statuses/{sha}","languages_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/languages","stargazers_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/stargazers","contributors_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/contributors","subscribers_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/subscribers","subscription_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/subscription","commits_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/commits{/sha}","git_commits_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/git/commits{/sha}","comments_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/comments{/number}","issue_comment_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/issues/comments{/number}","contents_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/contents/{+path}","compare_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/merges","archive_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/downloads","issues_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/issues{/number}","pulls_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/pulls{/number}","milestones_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/milestones{/number}","notifications_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/labels{/name}","releases_url":"https://api.github.com/repos/tharindu1st/carbon-apimgt/releases{/id}","created_at":"2015-02-22T06:57:35Z","updated_at":"2015-02-22T06:57:56Z","pushed_at":"2015-07-04T07:23:40Z","git_url":"git://github.com/tharindu1st/carbon-apimgt.git","ssh_url":"git@github.com:tharindu1st/carbon-apimgt.git","clone_url":"https://github.com/tharindu1st/carbon-apimgt.git","svn_url":"https://github.com/tharindu1st/carbon-apimgt","homepage":null,"size":32907,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:release-1.9.0","ref":"release-1.9.0","sha":"44d0eb858af35fddbcd8af34c915dbf8789b8cb7","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":17201744,"name":"carbon-apimgt","full_name":"wso2/carbon-apimgt","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/carbon-apimgt","description":"","fork":false,"url":"https://api.github.com/repos/wso2/carbon-apimgt","forks_url":"https://api.github.com/repos/wso2/carbon-apimgt/forks","keys_url":"https://api.github.com/repos/wso2/carbon-apimgt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/carbon-apimgt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/carbon-apimgt/teams","hooks_url":"https://api.github.com/repos/wso2/carbon-apimgt/hooks","issue_events_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/carbon-apimgt/events","assignees_url":"https://api.github.com/repos/wso2/carbon-apimgt/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/carbon-apimgt/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/carbon-apimgt/tags","blobs_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/carbon-apimgt/languages","stargazers_url":"https://api.github.com/repos/wso2/carbon-apimgt/stargazers","contributors_url":"https://api.github.com/repos/wso2/carbon-apimgt/contributors","subscribers_url":"https://api.github.com/repos/wso2/carbon-apimgt/subscribers","subscription_url":"https://api.github.com/repos/wso2/carbon-apimgt/subscription","commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/carbon-apimgt/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/carbon-apimgt/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/carbon-apimgt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/carbon-apimgt/merges","archive_url":"https://api.github.com/repos/wso2/carbon-apimgt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/carbon-apimgt/downloads","issues_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/carbon-apimgt/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/carbon-apimgt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/carbon-apimgt/labels{/name}","releases_url":"https://api.github.com/repos/wso2/carbon-apimgt/releases{/id}","created_at":"2014-02-26T06:46:48Z","updated_at":"2015-05-14T19:06:44Z","pushed_at":"2015-07-04T07:23:42Z","git_url":"git://github.com/wso2/carbon-apimgt.git","ssh_url":"git@github.com:wso2/carbon-apimgt.git","clone_url":"https://github.com/wso2/carbon-apimgt.git","svn_url":"https://github.com/wso2/carbon-apimgt","homepage":null,"size":82015,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":74,"mirror_url":null,"open_issues_count":5,"forks":74,"open_issues":5,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/209"},"html":{"href":"https://github.com/wso2/carbon-apimgt/pull/209"},"issue":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/issues/209"},"comments":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/issues/209/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/209/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/209/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/carbon-apimgt/statuses/2b495f9199e5e464334a1039d64b10254f02b0cc"}}}}