This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SNViewController.m | |
// SimpleNetwork | |
// | |
// Created by Bryan Barnard on 11/11/12. | |
// Copyright (c) 2012 Bryan Barnard. All rights reserved. | |
// | |
#import "SNViewController.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Net.Http; | |
using System.Net; | |
namespace HTTP_Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Sample HTTP Request to ServiceNow Demo Instance Using JSONv2 Web Service | |
import requests | |
from requests.auth import HTTPBasicAuth | |
#using local http proxy to log requests and responses | |
proxies = { | |
"http": "http://127.0.0.1:8888", | |
"https": "https://127.0.0.1:8888", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests.auth import HTTPBasicAuth | |
#using local http proxy to log requests and responses | |
proxies = { | |
"http": "http://127.0.0.1:8888", | |
"https": "https://127.0.0.1:8888", | |
} | |
auth = HTTPBasicAuth("admin", "admin") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
from requests.auth import HTTPBasicAuth | |
# using local http proxy to log requests and responses | |
proxies = { | |
"http": "http://127.0.0.1:8888", | |
"https": "https://127.0.0.1:8888", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
import datetime | |
from requests.auth import HTTPBasicAuth | |
# using local http proxy to log requests and responses | |
proxies = { | |
"http": "http://127.0.0.1:8888", | |
"https": "https://127.0.0.1:8888", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//make use of proxy package to make calls | |
var request = require('request'); | |
var r = request.defaults({'proxy':'http://127.0.0.1:8888'}) | |
r('https://demo003.service-now.com/stats.do', function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
console.log(body) // Print the body of the response | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST https://demo006.service-now.com/incident.do?SOAP HTTP/1.1 | |
Accept-Encoding: gzip,deflate | |
Content-Type: text/xml;charset=UTF-8 | |
SOAPAction: "http://www.service-now.com/incident/getRecords" | |
Content-Length: 326 | |
Host: demo006.service-now.com | |
Connection: Keep-Alive | |
User-Agent: Apache-HttpClient/4.1.1 (java 1.5) | |
Cookie: BIGipServerpool_demo006=808634890.33598.0000; JSESSIONID=4845EEC9C7ECAA69FBA52353A941BA52 | |
Cookie2: $Version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 200 OK | |
Set-Cookie: glide_user="";secure; Expires=Thu, 01-Jan-1970 00:00:10 GMT; HttpOnly | |
Set-Cookie: glide_user_session="";secure; Expires=Thu, 01-Jan-1970 00:00:10 GMT; HttpOnly | |
Set-Cookie: glide_user="U0N2Mjo5N2VhNTRiMTJmZjcxMTAwYjhjY2Y2N2I5MWExODk0Nzo2ODE2Zjc5Y2MwYTgwMTY0MDFjNWEzM2JlMDRiZTQ0MQ=="; Version=1; Max-Age=2147483647; Expires=Sun, 19-Apr-2082 06:32:21 GMT; HttpOnly | |
Set-Cookie: glide_user_session="U0N2Mjo5N2VhNTRiMTJmZjcxMTAwYjhjY2Y2N2I5MWExODk0Nzo2ODE2Zjc5Y2MwYTgwMTY0MDFjNWEzM2JlMDRiZTQ0MQ=="; Version=1; HttpOnly | |
Set-Cookie: glide_user_route=glide.a95da93e9baa2354958aa3c67bd1a027;secure; Expires=Sun, 19-Apr-2082 06:32:21 GMT; Path=/; HttpOnly | |
Pragma: no-store,no-cache | |
Cache-control: no-cache,no-store,must-revalidate,max-age=-1 | |
Expires: 0 | |
Content-Encoding: gzip |
OlderNewer