Put() public méthode

public Put ( string url, string data ) : ResponseEventArgs
url string
data string
Résultat ResponseEventArgs
Exemple #1
0
        public ResponseStatusEventArgs UpdateTitle(int overlayid, string title)
        {
            ResponseStatusEventArgs args = new ResponseStatusEventArgs();
            try
            {
                GeoComWebClient request = new GeoComWebClient();
                string url = String.Format("{0}/datasets/{1}.json?title={2}", EndpointURI, overlayid, title);
                setCredentials(request);

                //validateFileType(files);
                ResponseEventArgs response = request.Put(url, "");

                args._result = response.Status;
                args._location = response.Location;

            }
            catch (Exception ex)
            {
                args._error = ex;
            }
            return args;
        }
Exemple #2
0
        public ResponseStatusEventArgs UpdateTitle(string overlayUrl, string title)
        {
            ResponseStatusEventArgs args = new ResponseStatusEventArgs();
            try
            {
                GeoComWebClient request = new GeoComWebClient();
                string url = overlayUrl + "?title=" + title;
                setCredentials(request);

                //validateFileType(files);
                ResponseEventArgs response = request.Put(url, "");

                args._result = response.Status;
                args._location = response.Location;

            }
            catch (Exception ex)
            {
                args._error = ex;
            }
            return args;
        }
Exemple #3
0
        public ResponseStatusEventArgs UpdateTags(int overlayid, List<string> taglist)
        {
            ResponseStatusEventArgs args = new ResponseStatusEventArgs();
            try
            {
                GeoComWebClient request = new GeoComWebClient();
                string url = String.Format("{0}/datasets/{1}.json?tags=", EndpointURI, overlayid);
                string tags = String.Join("%20", taglist.ToArray());
                url += tags;
                setCredentials(request);

                //validateFileType(files);
                ResponseEventArgs response = request.Put(url, "");

                args._result = response.Status;
                args._location = response.Location;

            }
            catch (Exception ex)
            {
                args._error = ex;
            }
            return args;
        }