REST

156

Solutions

324

Contributors

Representational state transfer (REST) is an architectural style that gives a coordinated set of constraints to the design of components in a distributed hypermedia system used to design networked applications. RESTful systems typically communicate over Hypertext Transfer Protocol (HTTP) with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) that web browsers use to retrieve web pages and to send data to remote servers. REST interfaces with external systems using resources identified by Uniform Resource Identifier (URI) that can be operated upon using standard verbs.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have a REST call using jQuery Ajax and it works fine on every browser except for IE11.  When I make this POST call,  I get back a 400 error and the data doesn't get written.

Any advise on this would be greatly appreciated.
0
Free Tool: Site Down Detector
LVL 9
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I need to create a set of InfoPath forms and upload them with updated data to a document library.  I have put together some JavaScript which accomplishes this, but the upload of the document (InfoPath doc) is async and the code works fine when I run it in the debugger, but if I run the loop with no breakpoints, the browser hangs on the create/upload of the file.

I am not sure if it is that the function is async or that it appears to be CSOM whereas all my other code is using REST.  

Any help/ideas on this would be greatly appreciated.
0
I am writing a REST client application using Embarcadero C++ builder Xe10.1 Berlin.
I need to have the REST server IP address configurable.
I have initially set the TRESTClient component BaseURL property to a known server IP address in the IDE. The BaseURL property value is http://10.41.9.27:8080 and the application works just fine.
If I add code to change the BaseURL property however, the application doesn't respond and times out ?
Even if I use the value that works when set in the IDE, after the following code is run the application stops working ?

RESTClient1->BaseURL = u"http://10.41.9.27:8080";

Open in new window


Any ideas please ?
0

Proofreading & Editing Techniques for Executives & Managers

pexels-photo-381949.jpegIt’s hard to spoil high-quality content… or not? When it comes to content marketing and the creation of different types of writing content, proofreading and editing is just as crucial as the research and writing itself.

Why? Because when you offer writing content to the audience, you have to make sure that it looks flawless. Errors and typos that might slip into your writing can ruin this impression as well as damage your reputation. They basically tell the audience either that you weren’t attentive enough and didn’t put many efforts into content creation or that you have some problems with grammar and punctuation, which means that you aren’t a good writer you claim to be.

Either reaction is bad. It’s obvious that if you want to avoid it, you have to invest time and efforts into high-quality proofreading and editing. However, what exactly does this mean? What do you have to do in order to make your writing really polished and feel proofread?

1. Use various services.
The first and the simplest thing to do is to proofread your writing using some online service (for example, Grammarly). Such services check your grammar and punctuation and some of them even give you some stylistic tips.

However, if you want to make the most out of it, don’t settle for one service only. Choose a couple of other ones too and run your writing through them to ensure that all the errors were spotted.

2. Avoid distraction.
1
 
LVL 11

Expert Comment

by:Andrew Leniart
I find the statements highlighted below to be deliciously ironic to what this post is all about.

when you offer writing content to the audience, you have to make sure that it looks flawless

They basically tell the audience either that you weren’t attentive enough and didn’t put many efforts into content creation or that you have some problems with grammar and punctuation, which means that you aren’t a good writer you claim to be.

:^)
0
 
LVL 38

Expert Comment

by:BillDL
Some additions to Andrew Leniart's keen observations:

Feel free to invent a new word if you feel that the existing one is boring.  For example, "automated" is a terribly clichéd (so 90s) word that really needs to be "-ized" to jazz it up and make it fit for modern day corporate buzz-word parlance.

Just like any other tools, they are automatized and so unable to spot all the mistakes.

Sometimes we are so focused on grammar checks that we forget that other things have to be checked too.

I invariably find spelling and grammar errors on websites offering proofreading and essay writing services, so please don't take offence.  We all make such mistakes, but in articles about proofreading and on websites offering proofreading services, the spelling and grammar should be faultless.
0
Hello Experts,

Problem Description:
I need to be able to concatenate unique values from rows with otherwise similar data into a new column at the first occurrence of that row and eliminate the rest.  I have scoured the Internet and found several things that almost work, but I am not a code-head so I couldn't tailor anything to my needs.

Data Source:
     Mixed Bag of regularly replaced/updated external files (csv/txt/xls/xlsx)
     All merged, cleaned and transformed via Power Query aka "Get and Transform" (Excel 2016).

Data Set:
     100,000+ rows / 50+ columns

Desired Solution (in order of preference):
     1)  Power Query or M Language syntax
     2)  Formula
     3)  VBA

Thanks for the help.

Visual of Desired ResultUniques-Concat-Needed.xlsx
0
Using intel S1200BTL Server board with 4x3TB SATA HDD's.
Would like to have at least 150GB OS Drive and the rest as DATA drive.
Should I use ESRT2 or RST?
1
Hi,

We are developing code in order to do requests to webservices. I am looking  for online webservices that I can use in order to test the next two kind of requests:
- a PUT request
- a request with a HttpHeader

Both SOAP and REST requests.

Anyone a idea for an online application I can use?

Regards,

Arne
0
For two years our vb.net sync app has been running quite successfully hosted on Azure. It gathers recent Db updates and additions from a SQL Db and transposes them on a schedule into the MySQL Db behind a Wordpress site.

The only problem comes when there are two many records to update/add. Then it is prone to either fail or abort in Azure. This happens typically when there are over 500 records to process and the program running time exceeds an hour or two.  We have worked with the Azure team extensively to try and prevent this, but it keeps happening.

We would like to experiment working with the Wordpress REST Api therefore, to see whether time is saved, and efficiency is improved, over the app's current direct SQL calls to the MySQL Db.

The thing is, I'm struggling to find any documentation about how to incorporate the WP REST Api calls in a VB.net application. Does anyone have any examples of how this should be done?

Thank you
0
Dear Sirs,
I have a web app rendering html and exposing at the same time some REST end points.
I have 2 two classes annotated with @ControllerAdvice:
1) A Class will manage all the errors generated on the web side of the application, and redirects to an Error view page
2) The other Class will manage all the errors generated on the REST side of the application and returns an ResponsEntity<Object>

I have some custom exceptions such as NotFoundException, AccessDeniedException, etc.. And there is a generic ExceptionHandler for the Class Exception.class in both the 2 @ControllerAdvice Classes: 1 for web side exception and 1  for REST side exception.

The confusion  I am seeing is that when the generic exception occurs, while I am consuming the REST end points, I will get an HTML error view instead of a Jackson string representing the ResponseEntity<Object> and vice-versa.

How can I handle this. Make @ControllerAdvice Class 1 only look at exceptions generated by all the classes annotated with @Controller, and @ControllerAdvice Class 2 only look at exceptions generated by all the classes annotated with @RestController.


Thanks a in advance
0
Dear sirs,

I have CSRF enabled in my REST application.
I use either RestTemplate or Postman as Client.
How can I set the application in a way that each request (POST/PUT/DELETE) is carried with a token in its header.

I remember using an implementation of  ContainerRequestFilter while working on Jersey, and I could take care of my requests globally.

I am looking forward to hearing from you.
0
Understanding Linux Permissions
Understanding Linux Permissions

Linux for beginners: How to view the permissions associated with files and directories and also how you can change them.

I am using REST API with SharePoint 2013 and I want to know if the following url endpoint is legal or if there is a better way?
 //http://myspsite.com/nrm/_api/web/lists/getbyTitle('My_Project_Modules')/items?$select=DIR,Station,Title,Building_x0020_Number&$filter=Project_x0020_Number eq '402-CSI-001'     //<---  Works when I paste it in the browser
 var projNum = '402-CSI-001';
var endPointUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbyTitle('My_Project_Modules')/items?$select=DIR,Station,Title,Building_x0020_Number&$filter=Project_x0020_Number eq "+projNum;  //<---  Not valid when I run it in my code

Open in new window


Error I get in my js file
rest api error
js file
function loadSPItems() {
var projNum = '402-CSI-001';
var endPointUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbyTitle('My_Project_Modules')/items?$select=VISN,Station,Title,Building_x0020_Number&$filter=Project_x0020_Number eq "+projNum;//,ProjectNumber,ApprovalStatus,ProjectExecutionStatus”;
var headers = { 
	"accept": "application/json;odata=verbose" 
}
 
jQuery.ajax({ 
	url: endPointUrl, 
	type: "GET", 
	headers: headers, 
success: function (data) {
	console.dir(data);
}, 
	error: function (err) { 
	alert("Error Occured:" + JSON.stringify(err)); 
}
 
});
 
}

loadSPItems();

Open in new window




Thoughts?
0
Which Database Choose?

This Article about choose the NOSQL database based on application requirement. Different NoSQL DB’s available, there are three primary concerns you must balance when choosing a data management system: consistency, availability, and partition tolerance.

 

* Consistency means that each client always has the same view of the data. * Availability means that all clients can always read and write.

* Partition tolerance means that the system works well across physical network partitions.

 

Chose the Database system based on your application requirement.

 Example Comparing MongoDB and CouchDB.

As you can see in the diagram, MongoDB and CouchDB are built with a slightly different focus. Both scale across multiple nodes easily, but MongoDB favours consistency while CouchDB favours availability.

In the MongoDB replication model, a group of database nodes host the same data set and are defined as a Replica set. One of the nodes in the set will act as primary and the others will be secondary nodes. The primary node is used for all write operations, and by default all read operations as well. This means that replica sets provide strict consistency. Replication is used to provide redundancy - to recover from hardware failure or service interruptions.

CouchDB uses a replication model called Eventual consistency. In this system, clients can write data to one node of the database without waiting for other nodes to come into agreement. The …
0
I have a user form that is created in extjs framework. The user form has many user fields which are being passed as part of request payload to the REST controller. I am trying to add a grid panel(most likely in a tabular format with multiple rows & columns) to the user form. But I am not sure how to pass the grid panel data as part of request payload to the REST controller. I will post more code if any more details are needed. Any help would be appreciated. Thanks.

Ext.define('soylentgreen.view.admin.UserForm', {
    extend : 'Ext.form.Panel',
    alias : 'widget.userform',
    bodyStyle : 'padding:5px 5px 0',

// some userform elements like firstname,lastname, go here.....

name : 'userTeamGrid',
  xtype : 'gridpanel',
id : 'userTeamGrid',
itemId : 'userTeamGrid',
multiSelect : true,
selModel : Ext.create(
        'Ext.selection.CheckboxModel',
        {
          injectCheckbox : 'first',
          mode : 'MULTI',
          checkOnly : false
        }),
anchor : '100%',
width : '700px',
height : 250,
flex : 1,
store : 'userTeamStore',

var user = form.getRecord();
form.updateRecord(user);
user.save({
        callback : function(records, operation){
          //reset the (static) proxy extraParams object
          user.getProxy().extraParams =  {
            requestType: 'standard'
          }
          if(!operation.wasSuccessful()){
            var error = operation.getError();
0
I have an XML file that when passed through SOAP UI returns a proper response as XML file. I need to create an application to pass the XML and recuperate the response. I tried searching but many say REST web service where they using only post/get.

Please send me some sample code and/or tutorials.
0
I am exporting a table using pdfmake
The table exports, but there is one item that is 'undefined'.  

I have a main page with multiple tabs and once you hit the 'Printer Friendly' btn, a pdf report opens in a new tab for the specific tab you selected.  The 'printer friendly' btn is what exports the page.  

This code broadcasts  the print function to produce the pdf report depending on what tab you are on.
$scope.printDiv = function(divName) {		
		$rootScope.$broadcast('print');		
	}
	

Open in new window


and the button
<button ng-click="printDiv('rollup-tab')">Printer Friendly</button>

Open in new window



Here is the rest of the code.

Table creation and exports the pdf pdf
$scope.$on('print', function(event, filter) {
			var docDefinition = {

					content: [	
					          {
						  table: {

					              body: [                   			                
					                [ 
					                  '',
					                  'Actual Pieces Issued',
					                  {text: $filter('mcGoalNumberFilter')($scope.actualPiecesMCGoal) + ' /wk'},			                  
					                  {text: $scope.actualPiecesMon, style: 'tableData'},
					                  {text: $scope.actualPiecesTues, style: 'tableData'},
					                  {text: $scope.actualPiecesWed, style: 'tableData'},
					                  {text: $scope.actualPiecesThurs, style: 'tableData'},
					                  {text: $scope.actualPiecesFri, style: 

Open in new window

0
I have a simple REST Api app and have no issues when sending a GET request, everything works as expected. However, when I send either a PUT, POST or DELETE request, I just get 204 - No Data response and none of the code in the relevant methods is executed.

This what I have in my WebAPIConfig.vb file:

Public Module WebApiConfig
    Public Sub Register(ByVal config As HttpConfiguration)
        ' Web API configuration and services

        ' Web API routes
        config.MapHttpAttributeRoutes()

        config.Routes.MapHttpRoute(
            name:="DefaultApi",
            routeTemplate:="api/{controller}/{id}",
            defaults:=New With {.id = RouteParameter.Optional}
        )

    End Sub

End Module 

Open in new window


and the PUT method in the controller is simply logging the fact we got a request, but the code doesn't run:

' PUT: api/Barcode/5
        Public Sub PutValue(ByVal id As Integer, <FromBody()> ByVal value As String)

            auditLog("REST Call", "Received PUT request", False, False)

        End Sub

Open in new window

0
I have an on prem SharePoint 2013 site collection.  On that site, I have a form where I can add list items (records to the external SQL table).  It has been working fine and dandy.  Yesterday, the table was migrated to another SQL Server and version (2016).  Now,  I can add and modify the records on any browser other than IE (used to work there).  I get back a 400 error.

Any advice on this would be greatly appreciated.
0
i want to send email notification to few external users .

Tried using designer 2013 /2010 workflow.

Also tried JSom code using Rest Api
0
Hello Guys , i need a GPO for work life balance , just locking computer automatically after 4 hrs of activity and unlock it after 10 min of rest
0
A new era in Cloud training has arrived.
A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

Hi All,,,

Requirement is as follows:
(It may sound crazy or stupid but I welcome any better suggestions).
- I am pulling out a set of records in a Continuous Form based on a selection Query.
- When I update a text field, I want the change to reflect in the same field in the rest of the record set.

I did an Update Query which I run in the 'After Update event'  of the field.
Two scenarios:
1- When I include a Saverecord in the update event after running the Updating Query, I get the attached Error Message.
2- If I don't Saverecord in the AfterUdate, then I get caught with the same error message upon closing the form.

In both cases, the update query does its job very well.

On the Error Message:
- If I choose 'Copy to Clip Board', 'Save Record' or 'Drop Changes', nothing happens and  I can continue to close and nothing is affected to the updated fields.

I have observed the behavior very closely and it is fine EXCEPT the annoying Error Message, which sounds scaring.

Please advise of :
- Either a way to suppress the Error Message, or
- A better suggestion to achieve the requirement.


Many Thanks

BTW:
This is not a multiuser environment not even a split DB. It is confined to my PC only as it is still under development .

Write Conflic1
0
How to parse the  JSON Data using Rest web service give me a simple example
0
Hi Experts,

I have created a google rest api call using postman and can successfully retrieve an email from my gmail account. However, I need to extract some text from the body and it is coming back encrypted such as below

 "body": {
          "size": 2717,
          "data": "PCFkb2N0eXBlIGh0bWw-DQo8aHRtbD4NCjxoZWFkPg0KPG1ldGEgY2hhcnNldD0iVVRGLTgiPg0KPHRpdGxlPkNvbXBsZXRlIHlvdXIgUmVnaXN0cmF0aW9uPC90aXRsZT4NCjwvaGVhZD4NCg0KPGJvZHkgc3R5bGU9ImZvbnQtZmFtaWx5OkdvdGhhbSwgJ0hlbHZldGljYSBOZXVlJywgSGVsdmV0aWNhLCBBcmlhbCwgc2Fucy1zZXJpZjsgbGluZS1oZWlnaHQ6MS42ZW07IGZvbnQtc2l6ZToxNHB4Ij4NCjwhLS1baWYgbXNvXT4NCgk8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCQlib2R5LCB0YWJsZSwgdGQge2ZvbnQtZmFtaWx5OkFyaWFsLCBIZWx2ZXRpY2EsIHNhbnMtc2VyaWYgIWltcG9ydGFudDsgbGluZS1oZWlnaHQ6MS42ZW07fQ0KCTwvc3R5bGU-DQo8IVtlbmRpZl0tLT4NCgk8dGFibGUgc3R5bGU9InBhZGRpbmc6MTBweDsgd2lkdGg6YXV0bzsgbWFyZ2luOjAgMTAlIj4NCiAgICAJPHRyPg0KCQkJPHRkPg0KCQkJCQk8cCBzdHlsZT0idGV4dC1hbGlnbjpjZW50ZXI7Ij4NCgkJCQkJPGltZyBzcmM9ImNp.........

Open in new window


Has anyone had experience extracting data from the body or can offer any suggestions on how I can convert the data field into someting rreadable

Thanks
0
I am working with excel 2007 and I have changed my printer settings, selected all then changed the page set up, changed in print settings while under print entire workbook. All three option print the first page in color and the rest black and white and double sided. Right now I am going tab by tab to update the page setup - is there a better way to do this though.
0
Dears,
Some servers over the network I can open normally like \\severname\c$ with no issue but the rest of the servers I can't like I don't connect to the network.
I have windows 10 and this is normal netwrok with Microsoft active directory. The other machine I can connect and do it by my users to access all servers but not from my machine anymore.
Regards
Mostafa
0
Hello all,
our HTTP packets go via a proxy, unlike the rest of the TCP/IP packets.
so using ping to measure the latency between us and a webserver won't be very accurate. we need to measure latency over HTTP instead of ICMP.
any help ?
0

REST

156

Solutions

324

Contributors

Representational state transfer (REST) is an architectural style that gives a coordinated set of constraints to the design of components in a distributed hypermedia system used to design networked applications. RESTful systems typically communicate over Hypertext Transfer Protocol (HTTP) with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) that web browsers use to retrieve web pages and to send data to remote servers. REST interfaces with external systems using resources identified by Uniform Resource Identifier (URI) that can be operated upon using standard verbs.

Top Experts In
REST
<
Monthly
>

No Top Experts for this time period. Answer questions to earn the title!