Showing posts with label web service. Show all posts
Showing posts with label web service. Show all posts

Monday, November 8, 2021

Using Curl to test Jira API


curl -D- -X GET -H "Authorization: Basic [email + key]" -H "Content-Type: application/json" "https://[company].atlassian.net/rest/api/2/issue/[ticket id]"


[email + key] needs to be encrypted

Monday, February 24, 2014

Work Life: C# Web Service Errors

No spaces in name of XElement

Error Message:
System.Xml.XmlException: The ' ' character, hexadecimal value 0x20, cannot be included in a name.
This is because I had used:
XElement root = new XElement("List Of Members", e1, e2, e3);
... which should have been:
XElement root = new XElement("ListOfMembers", e1, e2, e3);

Parameterless Constructor

Error Message:
cannot be serialized because it does not have a parameterless constructor
This was because I was trying to return a variable of type XDocument which does not have a parameterless constructor. I then tried return specific classes, but still received this error because my classes did not have parameterless constructor.

Basically what the compiler is looking for is the follow:
public Class1
{
  Class1()
  { }
}
The constructor can also be private or internal if you do not want to have a public parameterless constructor.