Flowgear endpoint not working - flowgear

Trying to test a sample endpoint for a workflow that I configured as follows:
POST https://mycompany.flowgear.net/bizrules/validation/gstCheck/?name={businessName}&number={businessNumber}&date={startDate}&canID={candidateID}&pID={placementID}
I tested that endpoint on a browser with this, but it gives me a JSON with "There is no service at this location":
https://mycompany.flowgear.net/bizrules/validation/gstCheck/?name=ZV Consulting Inc.&number=83848 5183&date=09/02/2014&canID=309731&pID=3835
What am I doing wrong?

You're binding to POST so you can't open the URL in a browser as your browser is performing a GET. To test you'd need to use the Postman plugin and set the method to POST.
One thing to note though is that Postman makes cross origin requests so you need to set Allowed Origins to * in your Flowgear site detail screen (same place you set your vanity domain).

Related

How to open an API URL in Swagger

I have a URL say (https://example.net/api) and I need to see the endpoints associated with this URL in Swagger to perform API calls.
I tried options like (https://example.net/api/swagger.json) and (https://example.net/api/swagger.yaml) in Swagger Hub and Inspector as well but no luck. Instead I'm getting request terminated error.
Can anyone help me out with this.
Thanks!

Requestly chrome extension mock api response to 503

I want to change HTTP Status Code to 503 with a custom response body on URL ending with .mpd. I am using Requestly chrome extension to intercept the request and have it failed with 503.
Here is the Modify API Response rule screenshot
Here's Requestly logs in devtools which shows that request was correctly intercepted.
The rule looks like it kicks in but is not showing the correct response code. Looking at the network tab it looks like the interception did not work
Need help with mocking the status code to 503 and custom response body.
HTTP Status Code can not be changed by Chrome Extension. Chrome doesn't provide any APIs which allow Chrome Extensions to change the status code.
You should be able to solve this problem using the Requestly desktop app where you can also specify the status code while defining your mocked API response.
A desktop app-based solution is more reliable however if you really want to work with Chrome extension only. Here's a workaround that you can try
Setup a new API Mock with 503 Status Code and the Response Body
Setup a new Redirect Rule to redirect your actual URL to the Mock URL
More details are covered in this SO answer
References
https://requestly.medium.com/simulate-different-api-status-code-using-requestly-76f917c445eb

Error: redirect_uri_mismatch

I've been looking for this answer and the other pages didn't help me.
I'm trying to use the google drive api for php. I am trying to test on my local environment and receive this error.
Error: redirect_uri_mismatch
The redirect URI in the request: urn:ietf:wg:oauth:2.0:oob did not match a registered redirect URI
Request Details
scope=https://www.googleapis.com/auth/drive
response_type=code
redirect_uri=urn:ietf:wg:oauth:2.0:oob
access_type=offline
display=page
prompt=consent
client_id=735129338633-0epug8n80jsg0t50ijn7our4a661nnk6.apps.googleusercontent.com
Here is the page for the api:
The url is in
localhost:8888/Spreadsheets/driver.php
What am I doing wrong?
Looks like the current Google OAuth2 integration requires enabling
Contacts API
Google+ API
from the Google Developers Console for the associated Project. In my log I noticed errors liek 403, Access Not Configured. Please use ....
The redirect URI (where the response is returned to) has to be correct and exactly as you registered in the APIs console, and the error is indicating that you haven't done that or you haven't done it correctly.
To get the redirect URI from console:
Go to the console for your project and look under API Access.
Open Credentials section (in left side)
You should see your client ID & secret there, along with there is a
list of redirect URIs. If you want to change it or it was wrong,
click edit settings and modify.
Even if your redirect uri is properly set in the console, a lot of times, when you've recently changed settings in the google dev console, it will still tell you there's a redirect mismatch. It's a surprisingly common occurrence.
You can try...
Waiting; some have had luck with this, indicating that google takes some amount of time to register recent changes.
If you don't mind reconfiguring your app, creating a new client id in the google dev console tends to fix this problem with consistent results.

Jmeter error 404

I am trying to load test a webapp, which has following functonality
1. Login in app (setting some cookie variables )
2. Serach customer with some parameter
3. Get detail of particular customer
4. Logout from webapp
When i am running Jmeter i am getting status code 404
Any reference or help will be appriciated.
After googling i found 4** says you have sent bad request.
To check what request has been sent i am using fiddler and capturing original request (which is working from browser ) and request sent by Jmeter , I am comparing data under Inspector tab in Headers in fiddler, Is this right way to resolve the issue of 4**. What else i can do to fix this issue ?
Screen shots attached
I think, the HTTP header manager and HTTP cookie manager must be pushed up just before Recording Controller. Otherwise the requests are made without these header or cookie informations.
If you doing localhost testing should in the cookie manager config domain
localhost:8080.
You can see the request/response in View Results Tree. Just click on the tab Request or Response data respectively. If you're getting a 404, chances are the Response data tab will contain the 404 with (hopefully) information about the values that are invalid or missing.

Are there any samples/tutorials which tells how to call servlets on J2EE server from iPhone app?

Sorry for posting basic question but please give me your advise.
I have to write iOS application which communicates with web application deployed on Tomcat server.
The web application requires client-app to call the "logon" servlet with username and password to get JSESSIONID. Once client get JSESSIONID, the web application allows to invoke other servlets.
But I couldn't figure out how to manage the session to invoke these servlets.
Would you please introduce me the examples/tutorials to learn how to invoke these kind of servlets?
Thank you in advance.
Here's a decent example of making an http request from iOS:
iOS: How to make a secure HTTPS connection to pass credentials?
There's nothing magic about making the call to a j2ee tomcat server - it's just an HTTP request, so any way you can make an HTTP request will work for you.
Maybe this one too:
Can I make POST or GET requests from an iphone application?
edit: ahh, looks like this is the one you want:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html
The JSESSIONID is nothing special. If your application is set up to handle cookies coming back from your HTTP request then the JSESSIONID will come back as a cookie in the header. Otherwise you will be issued a redirect to a URL with the JSESSIONID in it. From there, if you handle cookies, the JSESSIONID will be passed automatically with each request with all of the other cookies. Otherwise you'll have to put it into the URL of each request manually.
Download the liveheaders plugin for Firefox and try hitting your servlet with the webbrowser and you can see how the JSESSIONID gets passed around. Next, turn off cookies in Firefox and you can see how it's passed around in the URL and you can see the redirect that Tomcat issues if you watch the headers in liveheaders.